Errors
In this guide, we will talk about what happens when something goes wrong while you work with the API.
Status codes
Here is a list of the different categories of status codes returned by the Kaddy API. Use these to understand if a request was successful.
- Name
2xx- Type
- Description
A 2xx status code indicates a successful response.
- Name
4xx- Type
- Description
A 4xx status code indicates a client error — this means it's a you problem.
- Name
5xx- Type
- Description
A 5xx status code indicates a server error — normally you won't be seeing these.
Possible errors
Whenever a request is unsuccessful, the Kaddy API will return an error response.
- Name
Unauthenticated- Type
- Status code: 401
- Description
Either the Authorization or X-Tenant headers are missing or invalid or the tokens user is not associated with the tenant.
- Name
Resource not found- Type
- Status code: 404
- Description
The resource could not be found. Probably you used an invalid endpoint.
- Name
Order not found- Type
- Status code: 404
- Description
No matching order for the given ID could be found.
- Name
Too Many Attempts.- Type
- Status code: 429
- Description
Requests are limited to 60 per minute. You can use the X-RateLimit-Limit and X-RateLimit-Remaining in the response headers to see how many requests are remaining.
- Name
Server error- Type
- Status code: 500
- Description
Something went wrong on our side. We are tracking all errors so we we'll be probably fixing it soon.
Error response
{
"error": "Unauthenticated",
}