Errors

The Didomi API uses standard HTTP response codes to indicate that an API request is a success or a failure. In general, the codes act as follows:

  • 2xx codes indicate a success

  • 4xx codes indicate an error in the parameters sent to the server (e.g., the authentication information is invalid, a required parameter is missing, etc.)

  • 5xx codes indicate a Didomi server-side error

When an error happens, you can look at the JSON response body to find more about the reason. The body will be an object with the following properties:

Example:

{
    "code": 400,
    "errors": {},
    "message": "Invalid authentication information",
    "name": "BadRequest"
}

Last updated