Skip to content

fix(external): use email_address_not_provided instead of 500 when provider omits email (fixes #2583) - #2713

Open
deepshekhardas wants to merge 1 commit into
supabase:masterfrom
deepshekhardas:fix/2583-email-not-provided-error-code
Open

fix(external): use email_address_not_provided instead of 500 when provider omits email (fixes #2583)#2713
deepshekhardas wants to merge 1 commit into
supabase:masterfrom
deepshekhardas:fix/2583-email-not-provided-error-code

Conversation

@deepshekhardas

Copy link
Copy Markdown

fix(external): use email_address_not_provided instead of 500 when provider omits email (fixes #2583)

When an external OAuth provider returns no email and the provider is not
email-optional, the callback returns a generic 500
(unexpected_failure), mis-classifying a non-server fault and leaving
clients no stable code to branch on.

Use the existing but unused email_address_not_provided error code with
422, matching how nearby external-identity conditions are reported. The
OAuth redirect keeps error=server_error (422 is not in
oauthErrorMap), so existing clients are unaffected while new clients
gain a stable code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

External provider with no email returns generic 500 (unexpected_failure) instead of email_address_not_provided

1 participant