{{ message }}
Repository navigation
fix: return 409 when a push target update reuses an existing identifier - #13789
Merged
Merged
Conversation
Updating a push target to an identifier already registered on another target hit the unique index on targets and surfaced as an unhandled 500 (Sentry CLOUD-3QX3). Create push target already maps this to USER_TARGET_ALREADY_EXISTS; the update path now does the same.
Contributor
2 tasks done
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after) |
loks0n
approved these changes
Sep 21, 2026
cursor Bot
pushed a commit
that referenced
this pull request
Sep 21, 2026
Take main's push-target duplicate E2E coverage from #13789 and keep the concurrent phone-token helper from this branch. Co-authored-by: Jake Barnby <abnegate@users.noreply.github.com>
abnegate
added a commit
that referenced
this pull request
Sep 22, 2026
Drop the account.php and AccountCustomClientTest changes: the phone token and push target duplicate handling landed on main via #13789 and #13790 with 409 semantics. Keep only the teams membership Duplicate mapping and its concurrent E2E coverage. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
PUT /v1/account/targets/:targetId/pushnow returns409 user_target_already_existswhen the new identifier is already registered on another target, instead of an unhandled 500. Fixes Sentry CLOUD-3QX3, 133 events since 9/5.Test Plan
Extended
testUpdatePushTargetinAccountCustomClientTest: creates a second push target, updates the first to the second's identifier, asserts 409 with theuser_target_already_existstype, then reads the account and asserts the first target's identifier is unchanged. Verified red (500) with the controller hunk reverted and green with it applied.Related PRs and Issues
The create push target endpoint already maps
DuplicatetoUSER_TARGET_ALREADY_EXISTS; this brings the update path in line.Checklist