Errors

In this guide, we will talk about what happens when something goes wrong while you work with the API.

You can tell if your request was successful by checking the status code when receiving an API response. If a response comes back unsuccessful, you can use the error type and error message to figure out what has gone wrong and do some rudimentary debugging.


Status codes

Here is a list of the different categories of status codes returned by the API.

  • Name
    200
    Type
    Required
    Description

    A 200 status code indicates a successful response.

  • Name
    400
    Type
    Required
    Description

    A 400 status code indicates that the request cannot be performed, as your input data is not valid.

  • Name
    403
    Type
    Required
    Description

    A 403 status code indicates that your request was not authenticated, is not authorized, or you used an invalid HTTP method.

  • Name
    422
    Type
    Required
    Description

    A 422 status code indicates that the request cannot be performed, as your input data is semantically not valid. The reason is stated in the reponse body. problem.

  • Name
    500
    Type
    Required
    Description

    A 500 status code indicates a server error. Contact support with error details to investigate this error.


Error response

Whenever a request is unsuccessful, the API will return an error response with a message in the payload. You can use this information to understand better what has gone wrong and how to fix it. Most of the error messages are pretty helpful and actionable.

The error response is using the RFC 7807 Problem Details format.

Error response

{
  "type": "about:blank",
  "title": "Bad Request",
  "status": 400,
  "detail": "Validation failed",
  "instance": "/api/dataproducts/123",
  "violations": [
    {
      "field": "id",
      "message": "must not be null"
    }
  ]
}