-
Notifications
You must be signed in to change notification settings - Fork 937
[Auth] Pass through server error messages to the error object when available #5423
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
Conversation
🦋 Changeset detectedLatest commit: d44e170 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Changeset File Check ✅
|
Size Analysis Report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, do we need to update the example in https://cloud.google.com/identity-platform/docs/blocking-functions#blocking_registration_or_sign-in since the error is in customData
? I think the only bit that needs to be updated is error.message.indexOf('Cloud Function') !== -1
should be error.customData.message.indexOf('Cloud Function') !== -1
In this case we shouldn't update the Cloud Identity Platform docs since the v9 SDK remains in beta for the Cloud Identity Platform features. We will need to update the compatibility layer to put the fields on the error instead of error.customData, but that's a larger PR that I'll do a bit later |
Fixes #5386
In keeping with the new error format, the message is in
error.customData.message
instead oferror.message
.