Skip to content

Abort the pending-authorization check with a named timeout reason - #1991

Merged
helpcodeai merged 1 commit into
mainfrom
fix/pending-auth-abort-reason
Dec 5, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/pending-auth-abort-reason

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

The dashboard asks GET /auth/pending with a 5 s timeout. The timer called controller.abort() with no reason, so the fetch rejected with "signal is aborted without reason". fetchPendingAuthorization catches that, but Sentry's fetch instrumentation still recorded it as an unhandled error (CLOUD-FRONTEND-Y, then CLOUD-FRONTEND-10 on /connectors/store). The timer now aborts with a TimeoutError DOMException, so the event says what happened and can be told apart from real failures.

Changes

  • pending-authorization.ts: abort with new DOMException('GET /auth/pending timed out', 'TimeoutError').
  • pending-authorization.spec.ts: a helper test with a fetch that never answers: the result is null and the signal's reason is a TimeoutError.

Behaviour is the same in Cloud and self-hosted (self-hosted never asks /auth/pending).

Type

  • Bug fix

Testing

  • Added/updated unit tests
  • npx tsc --noEmit -p tsconfig.json and npx eslint on both files in packages/frontend: clean.
  • Local Playwright could not start next dev in this worktree (shared node_modules), so the spec runs in CI (Frontend e2e).

Checklist

  • My code follows the existing code style
  • This PR has a descriptive title

Related Issues

Sentry CLOUD-FRONTEND-10 / CLOUD-FRONTEND-Y.

@helpcodeai
helpcodeai merged commit 2e5ddb6 into main Dec 5, 2026
14 checks passed
@helpcodeai
helpcodeai deleted the fix/pending-auth-abort-reason branch December 5, 2026 08:49
@helpcodeai helpcodeai mentioned this pull request Dec 5, 2026
5 tasks done
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.

1 participant