When working with our API, you’ll encounter five main kinds of errors: authorization errors, validation errors, server errors, Recital errors, and provider errors. Each type of error comes with an appropriate HTTP status code.

All errors share the same basic response format: a status key set to “false”, and a message describing the error. There may also be a data object containing more details, for example:

{
    "message": "Argument Error",
    "success": false
}

Validation errors

Validation errors are returned when your request fails one or more validation rules. Examples include not passing required parameters. They come with a 400 Bad Request status code:

{
    "message": "Argument Error",
    "success": false,
    "validationErrors": {
        "product": "product is required",
        "amount": "amount must be greater than 0.0"
    }
}