Fix all 14 open Sentry issues - #379
Merged
Merged
Conversation
Validate profile/clan route params, harden LocaleManager and Dexie, retry transient Bungie HTML and RaidHub 500s, route dot clicks through anchor href, and shim embedded-browser/userscript incompatibilities. Fixes WEBSITE-3C Fixes WEBSITE-3B Fixes WEBSITE-38 Fixes WEBSITE-4 Fixes WEBSITE-3A Fixes WEBSITE-37 Fixes WEBSITE-36 Fixes WEBSITE-39 Fixes WEBSITE-1A Fixes WEBSITE-33 Fixes WEBSITE-2C Fixes WEBSITE-35 Fixes WEBSITE-34 Fixes WEBSITE-1F Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Comment on lines
67
to
73
| console.error(err) | ||
| if ( | ||
| err instanceof BungiePlatformError && | ||
| ServerBungieClient.RetryableErrorCodes.has(err.ErrorCode) | ||
| ServerBungieClient.RetryableErrorCodes.has(err.ErrorCode) && | ||
| !url.searchParams.has("retry") | ||
| ) { | ||
| url.searchParams.set("retry", err.cause.ErrorStatus) |
There was a problem hiding this comment.
Bug: The retry logic for error code 1626 in ServerBungieClient is unreachable because the error is also listed in ExpectedErrorCodes, causing the check to fail.
Severity: MEDIUM
Suggested Fix
Refactor the conditional logic in ServerBungieClient.handle(). The check for ExpectedErrorCodes should not prevent the retry logic from being evaluated. Consider moving the retry blocks outside of the ExpectedErrorCodes guard so that retryable errors are handled before being dismissed as expected.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/services/bungie/ServerBungieClient.ts#L67-L73
Potential issue: In `ServerBungieClient.ts`, the error handling logic for retries is
nested inside a condition that explicitly skips errors found in `ExpectedErrorCodes`.
The new code adds error code 1626 to both `RetryableErrorCodes` and
`ExpectedErrorCodes`. As a result, when a `BungiePlatformError` with code 1626 occurs,
the outer condition `!(err instanceof BungiePlatformError &&
ServerBungieClient.ExpectedErrorCodes.has(err.ErrorCode))` evaluates to false. This
prevents the retry logic from ever being executed for this error on the server, and the
error is immediately re-thrown. This defeats the purpose of making the error retryable
and creates an inconsistency where the client-side `ClientBungieClient` would retry, but
the server-side would not.
Also affects:
src/services/bungie/BungieClient.ts:83~106
Did we get this right? 👍 / 👎 to inform future reviews.
Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
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.
Summary
Root-cause fixes for all 14 unresolved website issues — no policy-only silencing.
/profile/:idURLs withnotFound()before render (fixes hydration React #329)/clan/:groupId+ Bungie code 7 handlingnavigator.languagesbefore locale matching on/faqnotFound()useClanpointer-events: noneon SVG dot children so clicks hit the<Link href>targetsetter shim for Tampermonkey userscriptswebkit.messageHandlersstub for in-app browser injected scriptsTest plan
bun run lint+bun tscis:unresolved project:website→ 0APP_VERSION/profile/4611686018488107374,/clan/5257651,/faq, invalid/profile/foo→ not foundMade with Cursor