API errors
As described in the API introduction, the error object conforms to the Problem Details for HTTP APIs specification It is used to convey information about errors that occur while processing HTTP requests.
Below is a list of all potential API errors.
Unauthorized
The Authorization header is missing from the HTTP request, or has been sent with an invalid value.
Check the authorisation requirements of the endpoint, and send an appropriate token in the headers.
Forbidden
The provided token does not have permission to perform the requested operation.
Invalid Request
Invalid request errors occur when there is an issue with the request body or headers. This can include validation errors where one or more fields are invalid, or cases where the request body contains malformed JSON or cannot be deserialized. The errors field is included in the response only if the error is related to specific fields.
Example: Validation Errors
One or more fields in the request body or headers were invalid.
The errors
field included in the response will specify the JSON path of the request body fields or header names that were invalid,
alongside at least one description of the error for each invalid field.
Example: Malformed JSON
The request body contains malformed JSON or cannot be deserialized (for example, a property value has the incorrect type).
In this case, the errors field is not included because the issue is with the overall request structure, not specific fields.
Invalid state
The requested operation is invalid given the current state of the resource.
Not Found
The requested resource cannot be found. This can occur if an incorrect resource ID is used in the request.
Idempotency Error
Idempotency errors occur when an Idempotency-Key
is re-used on a request that does not match the first request’s API endpoint and parameters.
This error ensures that duplicate requests with different parameters are not processed multiple times,
maintaining the integrity and consistency of operations.
Too Many Requests
Too many requests have been sent in a given amount of time, leading to rate limiting.
Third Party Error
This error indicates that there was an issue with a third-party service, which is necessary for the requested operation, such as an insurer API. Please try again later or contact support if the issue persists.
Internal Error
An unexpected condition was encountered, and the server could not complete the request. Please try again later or contact support if the issue persists.