Troubleshooting and errors

There is nothing more frustrating than having an error and not knowing what it means.

In this section, we will cover the most common errors and how to avoid them.

Basic principle

As convention at Critizr, we decide to use the HTTP Codes at their fullest.
For the most common errors, we send back the most relevant HTTP Code.
In case of complex errors, we will send an HTTP error code and a payload with a detailed message.

Authorization

If your request causes an authentication error, the response will contain an error object. The error object includes information to help you resolve the problem.

The information included in the error object varies depending on the error, but all error objects include a code, which is a short, readable key to help you identify the error. Here are the Authentication error codes:

HTTP Status CodeMessageMeaningPotential Solution
401No API key found in requestThe Authorization header doesn't exist.Please add the Authorization header in your request.
403Invalid authentication credentialsThe provided access token is invalid.Check if the provided token matches the token sent by Critizr.

Rate Limits

We implement a rate limit policy for our endpoints. Abuses will trigger these limitations.

HTTP Status CodeMessageMeaningPotential Solution
429API rate limit exceededThe rate limit for this endpoint has been reached.Wait before trying to request this ressource again.

Common errors

HTTP Status CodeMessageMeaning
400Bad requestMake sure you use the correct url syntax.
403ForbiddenThe resource you are trying to read is inaccessible.
404Not foundYou are trying to read a resource that doesn't exist. Make sure you use the correct url syntax.
405Method Not AllowedThere should be a mistake between the endpoint and the HTTP verb used.
5XXInternal Server ErrorAn error occurred with our API.