Skip to content

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

Closed
@matthewnessworthy

Description

@matthewnessworthy

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions