Translate the validation error returned from the backend#42183
Translate the validation error returned from the backend#42183ahus1 merged 1 commit intokeycloak:mainfrom
Conversation
Closes keycloak#42182 Signed-off-by: Alexander Schwartz <[email protected]>
|
@keycloak/ui - I'm looking for input if/how this can be improved. Show the error message at the import control is beyond my React knowledge, so I'd be happy to receive some help or hints. I should be able to create a E2E test for the current change. Thanks! |
|
@ahus1 Error messages that come from the server are usually translated on the server. Otherwise, every kind of client using the admin API would need its own knowledge of all the errors that can happen on the server. And, it would need its own mechanism to do the translation. Unfortunately, most server-side error messages aren't translated at all and just show up in English. And I'm not even sure we have always done it properly on the client side either. |
|
+1, ideally this error should be coming from the API directly. However, we currently are not consistent about this throughout the UI. |
|
@jonkoops / @ssilvert - this is the same handling when updating user profile information in the Admin Console ( If you want to see a more general change, please create a follow up issue for those items. Should I read the comment for this issue in a way that I should rewrite the error handling in the backend to provide an already translated error message for the frontend? |
@ahus1 Since this is a common issue throughout, I won't hold you to doing the translation on the server side. If you want to just create an issue for fixing it everywhere and reference this PR, I'll approve. |
Closes #42182
Updated error message: