sidebar_position |
---|
4 |
AniAPI uses conventional HTTP response codes to indicate the success or failure of an API request. As a summary:
2xx
range indicates success4xx
range indicates an error regarding the information provided (e.g., a required parameter missing, a resource not found, etc)5xx
range indicates an error with AniAPI's server
:::caution
HTTP errors are returned inside the HTTP response header, instead API errors are returned inside the HTTP response body!
:::
When an API request gets an HTTP 200
status code as a response, it could mean that the API response contains an error.
These are the possible errors you can have:
Status | Reason |
---|---|
200 - OK |
Everything worked as expected |
400 - Bad request |
The request was unacceptable, often due to missing a required parameter |
401 - Unauthorized |
The user is not able to authenticate |
403 - Forbidden |
The user doesn't have permissions to perform the request |
404 - Not found |
The requested resource doesn't exist |
429 - Too many requests |
Too many requests hit the API too quickly from the same origin |
500 - Server error |
Something went wrong on AniAPI's end |
We recommend to focus on HTTP errors just for Authentication or network problems.