Skip to content

Fix: GitHub token failover - #119

Open
LindonAliu wants to merge 2 commits into
Younesfdj:masterfrom
LindonAliu:fix/github-token-failover
Open

Fix: GitHub token failover#119
LindonAliu wants to merge 2 commits into
Younesfdj:masterfrom
LindonAliu:fix/github-token-failover

Conversation

@LindonAliu

Copy link
Copy Markdown

Fixes an issue where profiles assigned to an invalid or expired GitHub token would fail immediately with:

GitHub token is invalid or expired.

GitFut already supports a pool of GitHub tokens and retries with a fallback token when the assigned token is rate-limited. However, a 401 response is classified as a config error, so no fallback was attempted even when other healthy tokens were available.

This change:

  • retries once with another healthy token when the assigned token is invalid or expired
  • keeps the existing behavior for unrelated network/server errors
  • adds a regression test covering the 401 failover case

This prevents a single expired token in GITHUB_TOKENS from breaking scouting for every username hashed to that token.

@zmunro

zmunro commented Aug 23, 2026

Copy link
Copy Markdown

Merge it please 😭

@zmunro zmunro left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@LindonAliu

Copy link
Copy Markdown
Author

Hey @Younesfdj, can you review this PR please ? Thanks :)

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.

2 participants