github
GitHub REST API Error Codes
Error identifiers returned in the message and errors[].code fields of GitHub REST API responses, plus the named messages used for common authentication and rate-limit failures.
13 codes
references docs.github.com/en/rest/overview/resources-in-the-rest-apidocs.github.com/en/rest/overview/troubleshooting-the-rest-api
· All codes 13 codes
- already_exists Already Exists Another resource has the same value for a field that must be unique, such as a label name or a repository name within an account. One of the errors[].code values accompanying a 422 Validation Failed response.
- bad_credentials Bad Credentials The GitHub API request included an Authorization header with a token or credential that is invalid, malformed, revoked, or expired. Returned with HTTP 401.
- custom Custom A validation error that doesn't fit the other predefined codes. The accompanying message field on the error entry holds a human-readable, endpoint-specific explanation. One of the errors[].code values accompanying a 422 response.
- invalid Invalid The formatting of a field in the request body is invalid — for example a string where a number is expected. One of the errors[].code values accompanying a 422 Validation Failed response.
- maximum_number_of_login_attempts_exceeded Maximum Number of Login Attempts Exceeded The account has been temporarily locked out of the API after too many failed authentication attempts. Returned with HTTP 403; the account owner must sign in through the web UI to unlock it.
- missing Missing A resource referenced in the request — for example a field value pointing to another object — does not exist. One of the errors[].code values accompanying a 422 Validation Failed response.
- missing_field Missing Field A required field on a resource was not set in the request body. One of the errors[].code values accompanying a 422 Validation Failed response.
- not_found Not Found The requested resource does not exist, or the authenticated user/token does not have permission to see it — GitHub returns 404 rather than 403 for private resources to avoid leaking their existence.
- rate_limit_exceeded Rate Limit Exceeded The primary rate limit for the authenticated user, token, or app has been used up. Returned with HTTP 403; the x-ratelimit-remaining and x-ratelimit-reset response headers indicate when requests can resume.
- requires_authentication Requires Authentication The requested endpoint or resource requires an authenticated request, but no Authorization header (or session) was provided. Returned with HTTP 401.
- secondary_rate_limit Secondary Rate Limit The request was blocked by GitHub's abuse-detection mechanism for triggering too many requests in a short period, high request concurrency, or excessive content creation — independent of the primary rate limit. Returned with HTTP 403.
- unprocessable Unprocessable The inputs provided were individually valid but could not be processed together — for example creating a pull request between two branches with no commit difference. One of the errors[].code values accompanying a 422 response.
- validation_failed Validation Failed The request body failed semantic validation. Returned with HTTP 422 alongside an errors array whose entries each carry a code such as missing, missing_field, invalid, already_exists, or unprocessable.