Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ahus1
Copy link
Contributor

@ahus1 ahus1 commented Aug 27, 2025

Closes #42182

Updated error message:

image

@ahus1 ahus1 self-assigned this Aug 27, 2025
@ahus1
Copy link
Contributor Author

ahus1 commented Aug 27, 2025

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

@ssilvert
Copy link
Contributor

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

@jonkoops
Copy link
Contributor

+1, ideally this error should be coming from the API directly. However, we currently are not consistent about this throughout the UI.

@ahus1
Copy link
Contributor Author

ahus1 commented Sep 1, 2025

@jonkoops / @ssilvert - this is the same handling when updating user profile information in the Admin Console (CreateUser.tsx) or in the Account Console (PersonalInfo.tsx).

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?

@ssilvert
Copy link
Contributor

ssilvert commented Sep 5, 2025

@jonkoops / @ssilvert - this is the same handling when updating user profile information in the Admin Console (CreateUser.tsx) or in the Account Console (PersonalInfo.tsx).

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.

@ahus1
Copy link
Contributor Author

ahus1 commented Sep 5, 2025

If you want to just create an issue for fixing it everywhere and reference this PR, I'll approve.

@ssilvert - Issue create here: #42394 - please approve. Thanks!

@ahus1 ahus1 marked this pull request as ready for review September 5, 2025 15:51
@ahus1 ahus1 requested review from a team as code owners September 5, 2025 15:51
@ahus1 ahus1 enabled auto-merge (squash) September 5, 2025 15:51
@ahus1 ahus1 merged commit 6fce9c8 into keycloak:main Sep 5, 2025
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation errors for required actions don't show translated messages

3 participants