Skip to content
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

API rate limit status code is sometime 403 not only 429 #1070

Closed
matthewnessworthy opened this issue Jun 13, 2022 · 0 comments · Fixed by #1072
Closed

API rate limit status code is sometime 403 not only 429 #1070

matthewnessworthy opened this issue Jun 13, 2022 · 0 comments · Fixed by #1072

Comments

@matthewnessworthy
Copy link
Contributor

As per the example GitHub can return a status code 403 (instead of only 429) on API rate limit over-usage.

https://docs.github.com/en/rest/overview/resources-in-the-rest-api#checking-your-rate-limit-status

I experienced this issue myself via 2 different responses:

API rate limit

"exception": {
    "class": "Github\Exception\RuntimeException",
    "message": "API rate limit exceeded for installation ID xxxxxxx.",
    "code": 403,
    "file": "/var/task/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php:123"
}

Secondary rate limit

"exception": {
    "class": "Github\Exception\RuntimeException",
    "message": "You have exceeded a secondary rate limit. Please wait a few minutes before you try again.",
    "code": 403,
    "file": "/var/task/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php:123"
}
acrobat added a commit that referenced this issue Jun 26, 2022
This PR was merged into the 3.4.x-dev branch.

Discussion
----------

Fixes #1070

Commits
-------

55e881a API rate limit error status can be 403
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 a pull request may close this issue.

1 participant