Repository navigation
fix: update rate limits from HTTP error responses - #877
Merged
anthony-gomez-fastly merged 4 commits intoOct 21, 2026
Merged
anthony-gomez-fastly merged 4 commits into
anthony-gomez-fastly merged 4 commits into
Conversation
anthony-gomez-fastly
self-requested a review
October 20, 2026 15:00
anthony-gomez-fastly
approved these changes
Oct 20, 2026
anthony-gomez-fastly
left a comment
Member
There was a problem hiding this comment.
LGTM, thank you for your contribution!
Member
|
@Shubham-Padkonde please fix the changelog and it should be good to go once @rcaril reviews as well |
rcaril
approved these changes
Oct 20, 2026
anthony-gomez-fastly
approved these changes
Oct 21, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Change summary
Update the client's rate-limit counters from valid response headers before returning an HTTP error. Previously, a
429response leftRateLimitRemaining()andRateLimitReset()at their previous values, making client-level backoff decisions use stale information.The original response and error are still returned. Missing or malformed headers retain the prior values, canceled requests with no response are safe, and GET/HEAD behavior is unchanged.
Fixes #857.
All Submissions:
Changes to Core Features
Validation after merging current main (Linux, Go 1.26.10):
make allpasses: module download/tidy, golangci-lint formatting and lint, and the full recorded-fixture test suite.git diff --checkpasses; module files unchanged.User Impact
Callers can read updated rate-limit state through the existing client accessors after rejected write requests.
Release considerations
No public API changes or new dependencies. Prepared and tested with Codex assistance.