fix: Handle HTTP 429 status code for rate limiting by abtris · Pull Request #3951 · google/go-github
GitHub API can return either 403 or 429 for rate limiting, but the library was only checking for 403. This caused 429 responses to be treated as generic ErrorResponse instead of RateLimitError or AbuseRateLimitError, breaking retry logic and rate limit handling. Changes: - CheckResponse now detects 429 with X-RateLimit-Remaining: 0 as RateLimitError (primary rate limit) - CheckResponse now detects 429 with secondary rate limit documentation_url as AbuseRateLimitError Reference: https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api
changed the title
Handle HTTP 429 status code for rate limiting
fix: handle HTTP 429 status code for rate limiting
abtris
changed the title
fix: handle HTTP 429 status code for rate limiting
fix: Handle HTTP 429 status code for rate limiting
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