Skip to content

fix(poll): trigger re-auth on 401 during hot-poll instead of retrying - #119

Merged
wgordon17 merged 1 commit into
gordon-code:mainfrom
wgordon17:fix/hot-poll-401-reauth
Jul 28, 2026
Merged

fix(poll): trigger re-auth on 401 during hot-poll instead of retrying#119
wgordon17 merged 1 commit into
gordon-code:mainfrom
wgordon17:fix/hot-poll-401-reauth

Conversation

@wgordon17

Copy link
Copy Markdown
Member

Summary

  • Hot-poll (PR status + workflow run refresh) absorbed 401 Bad Credentials errors into the generic hadErrors/backoff path, so an expired or revoked token caused an endless "retrying with backoff" loop instead of prompting re-authentication (root-caused from Sentry issue GITHUB-TRACKER-6)
  • Adds a shared isUnauthorizedError() helper and propagates 401s through fetchHotPRStatus/fetchHotData so the hot-poll cycle now triggers expireToken() + redirect to /login, matching the existing full-poll and cross-tab-sync re-auth behavior
  • Adds 9 new tests covering the helper and 401 propagation/redirect at each layer

The hot-poll cycle (PR status + workflow run refresh) absorbed 401
Bad Credentials errors into the generic hadErrors/backoff path, so an
expired or revoked token produced an endless "retrying with backoff"
loop instead of prompting re-authentication. The full poll already
special-cases 401 to trigger expireToken() + redirect; hot-poll now
does the same via a shared isUnauthorizedError() helper.

Fixes GITHUB-TRACKER-6
@wgordon17
wgordon17 marked this pull request as ready for review July 28, 2026 18:34
@wgordon17
wgordon17 merged commit 20530b5 into gordon-code:main Jul 28, 2026
1 check passed
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