Handling errors

Catch and respond to invalid requests, authentication issues and more.

When using our API, it is crucial to anticipate and handle errors effectively.

To aid in this process, our API utilizes a standardized format for returning error messages.

These error responses provide detailed information on the nature of the error, by adhering to this format, developers can easily identify and resolve issues when they arise, improving the overall reliability and efficiency of the API integration.

Errors in responses

Rated API's errors will always be returned as JSON

Errors will always come in a dictionary containing a "detail" key and its value can be either a list of dictionaries or a string describing the error message.

400 Bad Request

  "detail": [
      "loc": ["body", "email"],
      "msg": "value is not a valid email address",
      "type": "value_error.email",

401 Unauthorized

{"detail": "Not authenticated"}

Reason: You forgot to send the Authorization header with a Bearer token.

403 Forbidden

{"detail": "You don't have permission to do that."}

Reason: The token you are using does not have enough permission to perform the request.

404 Not Found

{"detail": "Not found."}

Reason: The resource you requested was not found. Double check the API Reference.

429 Too many requests

{"detail": "Too many requests"}

Reason: You have hit too quick too many times the API. Back-off and retry later.

5xx Server errors

{"detail": "Internal server error."}

Reason: Something went wrong on our side, these are rare. In case you need assistance contact us and provide the Request ID and we will gladly help you.

Last updated