Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/popular-monkeys-clap.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Fix the OAuth errors coming from the server to use localizations
Original file line numberDiff line numberDiff line change
Expand Up@@ -174,7 +174,7 @@ export function _SignInStart(): JSX.Element {
case ERROR_CODES.SAML_USER_ATTRIBUTE_MISSING:
case ERROR_CODES.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:
case ERROR_CODES.USER_LOCKED:
card.setError(error.longMessage);
card.setError(error);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anagstef but does the code exist under the unstableErrors in localizations ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter, if it does not exist, it fallbacks to the longMessage.

break;
default:
// Error from server may be too much information for the end user, so set a generic error
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -151,7 +151,7 @@ function _SignUpStart(): JSX.Element {
case ERROR_CODES.SAML_USER_ATTRIBUTE_MISSING:
case ERROR_CODES.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:
case ERROR_CODES.USER_LOCKED:
card.setError(error.longMessage);
card.setError(error);
break;
default:
// Error from server may be too much information for the end user, so set a generic error
Expand Down