Repository navigation
[2.1] Fixes #38023: preserve 424 FAILED_SEND_EMAIL in signup/password-reset flows (backport 2.1 #38051) - #38231
Conversation
… flows (#38051) * fix(auth): preserve raw HTTP status for non-enum codes in WebServiceException * test(auth): assert persisted password on reset email-failure path Address greptile feedback on BasicAuthenticatorEmailFailureTest: capture the User handed to createOrUpdate and verify it carries a BCrypt hash of the requested new password, so the test fails if the password is never set on the saved user (instead of relying solely on createOrUpdate being called). --------- Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com> (cherry picked from commit 2cc8c55)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟡 Medium riskPreserving raw HTTP status codes changes exception responses across the SDK; email failures may return typed 424 rather than generic 500. Backport of the fix that keeps raw HTTP status codes in VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Backport of #38051 to
2.1. Issue: #38023.What
CustomExceptionMessage(int, ...)coerced the status throughResponse.Status.fromStatusCode(...), which returnsnullfor codes outside the enum (424). The null status madeWebServiceException.getResponse()throwIllegalArgumentExceptioninside the exception mapper, so the basic-auth email-failure paths answered a generic 500 with an empty body instead of 424FAILED_SEND_EMAIL.WebServiceExceptionnow keeps the raw int status code.Clean cherry-pick of 2cc8c55, no conflicts.
Tests
SecurityUtilTest,BasicAuthenticatorEmailFailureTest,CatalogGenericExceptionMapperTest,CustomExceptionMessageTest,LdapAuthenticatorBindTest,OpenLineageEntityCreatorTest— Tests run: 137, Failures: 0, Errors: 0.spotless:checkclean.main(Fixes #38023: preserve 424 FAILED_SEND_EMAIL in signup/password-reset flows #38051), same code: the 6 new tests fail without the fix (Response status must not be 'null'); impacted ITs 457 run / 0 failures; live server with a broken email template:POST /users/signup,PUT /users/resendRegistrationToken,POST /users/password/resetwent from 500 (empty body) to 424FAILED_SEND_EMAIL.🤖 Generated with Claude Code


Confidence Score: 5/5
This PR appears safe to merge.Summary
Preserves HTTP 424 and
FAILED_SEND_EMAILwhen signup or password-reset email templates fail.Reviews (2) · Last reviewed commit: "Fixes #38023: preserve 424 FAILED_SEND_E..." · Reviewed by Greptile