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

Provide a function to customize error message #2104

Closed
hoang-innomize opened this issue Nov 14, 2018 · 14 comments
Closed

Provide a function to customize error message #2104

hoang-innomize opened this issue Nov 14, 2018 · 14 comments
Labels
Auth Related to Auth components/category feature-request Request a new feature UI Related to UI Components

Comments

@hoang-innomize
Copy link

hoang-innomize commented Nov 14, 2018

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.."}

image

I wanted to change error message such as remove UserMigration failed with error text or using locale (ref #867)

@elorzafe elorzafe added the Auth Related to Auth components/category label Nov 14, 2018
@elorzafe
Copy link
Contributor

@hoang-innomizetech thanks for your feedback. I will mark this as a feature request!

@elorzafe elorzafe added the feature-request Request a new feature label Nov 14, 2018
@TOPS-Aman
Copy link

Any update on this?

@hoang-innomize
Copy link
Author

@elorzafe oza could you please let us know the status of this issue?

@elorzafe
Copy link
Contributor

@hoang-innomizetech Sorry for the late response, but this is still on our backlog.

@eanntuan
Copy link

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!

@crcommons
Copy link
Contributor

@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.

@jordanranz
Copy link
Contributor

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:

#3279

@sammartinez sammartinez added the UI Related to UI Components label Oct 14, 2019
@satishmolletipipra
Copy link

satishmolletipipra commented Dec 3, 2019

@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.

@hoang-innomize
Copy link
Author

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

@nihp
Copy link

nihp commented Mar 3, 2020

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

@bmilesp
Copy link

bmilesp commented May 20, 2020

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.

@satishmolletipipra
Copy link

is there any way to capture and customize the error message in Amplify Angular.

@jordanranz
Copy link
Contributor

This feature has been implemented: #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

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Auth Related to Auth components/category feature-request Request a new feature UI Related to UI Components
Projects
None yet
Development

No branches or pull requests

10 participants