-
Notifications
You must be signed in to change notification settings - Fork 355
fix(worker): include HTTP status in code host retry warnings #1576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
brendan-kellam
merged 3 commits into
main
from
brendan/fix-github-rate-limit-classification
Aug 13, 2026
+3
−2
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: sourcebot-dev/sourcebot
Length of output: 29451
🏁 Script executed:
Repository: sourcebot-dev/sourcebot
Length of output: 50379
🏁 Script executed:
Repository: sourcebot-dev/sourcebot
Length of output: 11920
🌐 Web query:
GitHub REST API documentation response headers x-ratelimit-remaining x-ratelimit-reset retry-after x-github-request-id💡 Result:
The GitHub REST API includes several response headers that provide information about your request status, rate limits, and request tracking. x-ratelimit-remaining: This header indicates the number of requests remaining in your current rate limit window [1][2]. If this value is 0, you have exhausted your primary rate limit for the current window [1][3]. x-ratelimit-reset: This header specifies the time at which the current rate limit window resets, provided in UTC epoch seconds [1][3]. If you exceed your primary rate limit (resulting in a 403 or 429 status code), you should not retry your requests until after this time has passed [1][2]. retry-after: When you exceed a secondary rate limit, the API may return this header [4][3]. It indicates the number of seconds you should wait before retrying your request [3][2]. If this header is present, you must wait at least that many seconds before making another request [3][5]. x-github-request-id: This is a unique identifier assigned to every request made to the GitHub API [6]. It is useful for troubleshooting purposes, as you can provide this ID to GitHub support if you need to investigate specific issues or failed requests. In general, if you receive a 403 or 429 error and no retry-after header is present, the documentation recommends waiting at least one minute before retrying [3][7]. If failures persist due to secondary rate limits, you should implement an exponentially increasing wait time between retries [3][2].
Citations:
Include available GitHub response metadata in the retry warning.
When
isOctokitRequestError(e)is true, passretry-after,x-ratelimit-remaining,x-ratelimit-reset, andx-github-request-idfrome.response?.headersas Winston metadata. Omit unavailable headers.🤖 Prompt for AI Agents
Source: MCP tools