Skip to content

fix(api): handle rejected fetch callbacks - #126704

Open
sansynx wants to merge 5 commits into
getsentry:masterfrom
sansynx:fix/rejected-fetch-errors
Open

sansynx wants to merge 5 commits into
getsentry:masterfrom
sansynx:fix/rejected-fetch-errors

Conversation

@sansynx

@sansynx sansynx commented Oct 7, 2026 •

Copy link
Copy Markdown

Fixes #126120

Current master already rejects requestPromise() through its fallback, but a rejected fetch still skips direct request() error and completion callbacks.

Route non-abort fetch failures through the existing error and completion handlers with status 0 and no JSON body, then clean up the active request. Keep these failures classified as RequestError so the SDK's no-response filter continues to apply to main errors and causes. Intentional cancellations remain silent, and server errors remain reportable.

Validation:

  • API, SDK initialization/filtering, and unchanged replay suites: 177 tests passed
  • Before the follow-up fix, six regression cases failed for incorrect error classification and filtering across GET, POST, PUT, PATCH and DELETE
  • Oxfmt checks passed for all affected files
  • Affected-file lint passed with SENTRY_OXLINT_TYPEAWARE=false and --threads 1
  • Independent diff review and git diff --check passed

Tests used the existing Jest runner, standard setup and aliases, pinned Linux Node 24.14.0 and a private cache. Full local typechecking, application build and browser verification were not run. The earlier local prek attempt stalled before its hooks executed; CI pre-commit lint, TypeScript and oxlint passed on the previous commit. The new push will rerun CI.

AI assistance was used to prepare and validate this change

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.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 7, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5384ad3. Configure here.

Comment thread static/app/api.tsx
@sansynx
sansynx requested review from a team as code owners October 7, 2026 13:12
@sansynx
sansynx requested review from logaretm, msonnb, nicohrubec and s1gr1d and removed request for a team October 7, 2026 13:12
@sansynx

sansynx commented Oct 13, 2026

Copy link
Copy Markdown
Author

could a collaborator add the Trigger: getsentry tests label after reviewing this and authorize the Vercel preview? those checks are waiting on approval

This branch has not been deployed

No deployments
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rejected fetch in api.tsx leaves requestPromise pending

2 participants