Skip to content

[2.1] Fixes #38023: preserve 424 FAILED_SEND_EMAIL in signup/password-reset flows (backport 2.1 #38051) - #38231

Merged
yan-3005 merged 1 commit into
2.1from
backport/2.1/fixes-38023-preserve-424-failed-send-email
Nov 19, 2026
Merged

yan-3005 merged 1 commit into
2.1from
backport/2.1/fixes-38023-preserve-424-failed-send-email

Conversation

@yan-3005

@yan-3005 yan-3005 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #38051 to 2.1. Issue: #38023.

What

CustomExceptionMessage(int, ...) coerced the status through Response.Status.fromStatusCode(...), which returns null for codes outside the enum (424). The null status made WebServiceException.getResponse() throw IllegalArgumentException inside the exception mapper, so the basic-auth email-failure paths answered a generic 500 with an empty body instead of 424 FAILED_SEND_EMAIL. WebServiceException now keeps the raw int status code.

Clean cherry-pick of 2cc8c55, no conflicts.

Tests

  • Unit (reactor build on this branch): SecurityUtilTest, BasicAuthenticatorEmailFailureTest, CatalogGenericExceptionMapperTest, CustomExceptionMessageTest, LdapAuthenticatorBindTest, OpenLineageEntityCreatorTest — Tests run: 137, Failures: 0, Errors: 0. spotless:check clean.
  • On 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/reset went from 500 (empty body) to 424 FAILED_SEND_EMAIL.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Preserves HTTP 424 and FAILED_SEND_EMAIL when signup or password-reset email templates fail.

  • Email failures keep their intended 424 status and error details.

Reviews (2) · Last reviewed commit: "Fixes #38023: preserve 424 FAILED_SEND_E..." · Reviewed by Greptile

… 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)
@yan-3005
yan-3005 requested a review from a team as a code owner November 19, 2026 16:14
@yan-3005
yan-3005 requested review from mohityadav766 and removed request for a team November 19, 2026 16:14
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Preserving 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 WebServiceException, so basic-auth email-failure paths in signup, resend-token, and password-reset now return 424 FAILED_SEND_EMAIL instead of a generic 500 with an empty body. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@yan-3005
yan-3005 merged commit 6f723aa into 2.1 Nov 19, 2026
50 of 52 checks passed
@yan-3005
yan-3005 deleted the backport/2.1/fixes-38023-preserve-424-failed-send-email branch November 19, 2026 17:45
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.

2 participants