find-a-pr
find-a-pr copied to clipboard
Change the status code from 503 to 429
In app/Livewire/ListIssues.php around line 98 where we are catching GitHubRateLimitException, we are returning a 503 status code.
503 indicates the server is temporarily unable to handle the request. I do not think that is precise enough for what is happening and status 429 would be more appropriate.
HTTP status code 429 is specifically designed for rate limiting scenarios. It indicates the user has sent too many requests in a given amount of time ("rate limiting"), which is what the GitHubRateLimitException is meant to catch.
PR Summary
- Transition from HTTP Status Code 503 to 429 for GitHub Rate Limit Exceptions In scenarios when the rate limit of GitHub API requests is exceeded, the system will now return a HTTP status code of 429 (indicating too many requests), instead of the previous status code 503 (indicating server unavailable). This change represents a more accurate description of such events.