Skip to content

fix(coding-conventions): Refactor relocation API call to use try/catch - #126272

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix-coding-convention-relocation
Open

sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix-coding-convention-relocation

Conversation

@sentry

@sentry sentry Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

This PR addresses a false positive reported by the no-callback-api-request convention checker in static/gsAdmin/views/relocationCreate.tsx.

The original issue was that the checker incorrectly flagged line 64 as a violation, even though the LLM analysis correctly identified the code snippet at that line as compliant. The actual violation was a requestPromise().catch() chain at lines 48-53, which the checker was misreporting.

This fix refactors the promoCodeApi.requestPromise().catch() pattern into a try/catch block. This brings the code into full compliance with the no-callback-api-request convention and removes a hacky throw new Error() workaround, replacing it with a clean return statement for the specific 403 error case.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes CODING-CONVENTIONS-6MF

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
@sentry
sentry Bot requested a review from a team as a code owner October 1, 2026 22:53
@sentry sentry Bot assigned ryan953 Oct 1, 2026
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 1, 2026
@ryan953 ryan953 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Oct 2, 2026

This branch was successfully deployed

1 active deployment
Preview — 1e505001 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant