API errors
When there is something wrong with a request, the API returns an error response that looks like this:
http_status_code: the status code associated with the errorerror_type: a general error categoryerror_code: a more specific error subcategoryerror_message: [optional] a detailed description of the errorfield: [optional] the field at fault, if applicableerrors: [optional] an array of individual errors, present when multiple fields fail validation at once
Error types
Errors are categorised into the following types:
validation_errors
Used for requests that are valid syntax-wise, but semantically-incorrect and cannot be processed by the server.
For example, if the request is missing required fields or header, or a request field is incompatible with a user's configuration.
Multiple validation errors
When multiple fields fail validation at once, the errors may be returned together.
The error_code is error_list and the individual errors are in the errors array,
each with their own error_code, error_message, and field. The top-level error_message and field are not present
as the details are in the array.
syntax_error
Used for syntactically-incorrect requests, i.e. where the grammar or form of the request itself is wrong.
For example, if the request is invalid JSON, or a query or path parameter is incorrectly-formatted.
security_error
Used when there is an issue with authentication or permissions.
For example, if an API key has not been provided, or a user does not have sufficient permission to perform an action.
internal_error
Used when the error is on Rootline's side.
idempotency_error
Used when there is an issue with the idempotency keys.