When an error occurs during sign in, I wanted to customize the error message to display on UI.
For an example, when signing in I got below error from Cognito User Pool
{"__type":"UserNotFoundException","message":"UserMigration failed with error Username or password is incorrect.."}
I wanted to change error message such as remove UserMigration failed with error text or using locale (ref #867)
@hoang-innomizetech thanks for your feedback. I will mark this as a feature request!
Any update on this?
@elorzafe oza could you please let us know the status of this issue?
@hoang-innomizetech Sorry for the late response, but this is still on our backlog.
Is there any update on this feature request? Also - would be extremely helpful for the iOS SDK. Customizing error messaging to help us guide users is extremely important for our app!
@eanntuan as a hack, you could customize your error messages using the i18n translations instead. Write your custom error messages as values with the existing error messages as the keys, and then wire up amplify's i18n module.
FYI, we have started an RFC discussion for a proposed Amplify UI Component refactor to increase customizability and flexibility for our components. Please feel free to add any additional comments to the following issue:
@elorzafe Any update on this feature(customize error message) and while signing into the application we are not showing the loader for the user. currently i didn't find any property or function to handle the loader feature while login. can you please help me on these two issues.
For over 6 months UI refactor epic just completed 30%, so we might need to wait for one more year to get this change released
I need to customize most of the error messages.
For eg) I got network error in UI.
Message needs to tell, Turn on your network connection to proceed the process(May be sign in, sign up, Forgot password or any thing)
Any update on this?
Or can anyne suggest any good way to customize the authentication screens
Is there a way to maybe capture the errors via eventbus or Hub?
If so you could maybe use I18n.get() the incoming message to translate.
is there any way to capture and customize the error message in Amplify Angular.
This feature has been implemented: https://github.com/aws-amplify/amplify-js/pull/6325
and released in @latest
.
You can find documentation for using I18n in the new UI components here
Here is the list of Error strings from auth which are now exported from Translations
mentioned above:
https://github.com/aws-amplify/amplify-js/blob/main/packages/auth/src/common/AuthErrorStrings.ts
Most helpful comment
@elorzafe oza could you please let us know the status of this issue?