Commit 7e7ec9e
fix: return email_address_not_provided for external provider with no email
The OAuth callback rejected a missing provider email with a generic
NewInternalServerError, surfacing as HTTP 500 / unexpected_failure. That
masks a non-server fault and leaves clients without a stable way to detect
the case (only the human-readable message). Use the already-defined but
unused ErrorCodeEmailAddressNotProvided via NewUnprocessableEntityError
(422) so clients can handle it explicitly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 983f59a commit 7e7ec9e
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
| |||
0 commit comments