Export Cognito errors so developers can easily reference them in our code #13312
Labels
Auth
Related to Auth components/category
Cognito
Related to cognito issues
duplicate
If marked with duplicate, issue will be closed & original will be added for traceability
feature-request
Request a new feature
Is this related to a new or existing framework?
No response
Is this related to a new or existing API?
Authentication
Is this related to another service?
No response
Describe the feature you'd like to request
It would be great if we could have access (import) the various Cognito exceptions here: https://github.com/aws-amplify/amplify-js/blob/7ddca1bc9fa9d991259466b2d1e391cede1c206d/packages/auth/src/providers/cognito/types/errors.ts
This way, we can have better type safety in our own code, and auto-complete to get a comprehensive list of all possible errors for the various Auth functions.
Describe the solution you'd like
Please export these exceptions so they're available to import from
aws-amplify/auth
.Describe alternatives you've considered
Copying and pasting these errors into our own codebase. This isn't ideal, just in case an AWS developer changes or adds new exceptions.
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: