Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: auth category should throw AuthError instead of PredictionsError #830

Merged
merged 1 commit into from
Oct 16, 2020
Merged

fix: auth category should throw AuthError instead of PredictionsError #830

merged 1 commit into from
Oct 16, 2020

Conversation

jtbergman
Copy link
Contributor

Issue #, if available:
Fixes #829

Description of changes:
When adding an Auth plugin using Amplify.add(plugin:), if the plugin does not have a key a PredictionsError will be thrown. Since this is the AuthCategory I would expect an AuthError to be thrown. This code changes the error to an AuthError and adds a new unit test to verify (1) that an error is thrown and (2) that the error is an AuthError.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jtbergman jtbergman marked this pull request as ready for review October 16, 2020 19:37
@lawmicha
Copy link
Contributor

Thanks @jtbergman! merging this in

@lawmicha lawmicha merged commit aa846e9 into aws-amplify:main Oct 16, 2020
@jtbergman jtbergman deleted the fix/authcategory-error branch October 16, 2020 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auth Category is throwing a PredictionsError instead of an AuthError
3 participants