Error Handling
Last changes: 03-30-2021
{
"traceId": (generated using uuid )
"errors": [
{
"message": (predefined message based on error code),
"code": (error code),
"property": (property from the request, which caused the issue),
"context": { (key and value pairs from the validation, predefined list}
},
...
{},
{}
]
}
Field | Description |
traceId | Internally generated trace_id for this error message so it can be found easily in the logs. |
message | A predefined string which describes the error. The purpose of the message is to allow for future usage of translation. |
code | A pre-defined code from the list below. |
property | The property from the request object which the error is linked to. |
context | A json object containing a list of predefined properties which are filled based on the error. DO NOT provide empty properties. The available properties are as follows: { "type": , "minimum": , "maximum": , "maxLength": , "allowedValues": } |
HTTP Code | Error Code | Message | Context |
400 | value_out_of_bounds | Value out of bounds. Value must be between {{context.minimum}} and {{context.maximum}} | { "minimum": "", "maximum": "" } |
400 | invalid_property | The provided property is now allowed. | |
400 | missing_mandatory_property | Missing mandatory property. Cannot find {{error.property}}. | |
400 | incorrect_type | Incorrect value for {{error.property}}. Expected {{context.type}}. | { "type": "" } |
400 | missing_mandatory_query_parameter | Missing mandatory query parameter. Cannot find {query parameter}. | |
400 | invalid_value_length | Incorrect value length for {{error.property}}. Expected string with minimum length {{context.minLength}} and maximum length {{context.maxLength}}. | { "minLength": "", "maxLength": "" } |
400 | object_not_found | Incorrect value for {{error.property}}. The reference provided does not exist. | |
400 | incorrect_value | Incorrect value for {{error.property}}. Expected values are {{error.context.allowed_values}}. | { "allowedValues": "" } |
400 | incorrect_currency | The value provided does not match the accepted convention ISO 4217. | |
400 | past_date | The {{error.property}} provided is in the past. | |
400 | malformatted_request | The provided request is with incorrect format. | |
400 | processing_error | The request failed during processing. Please check the data provided and try again. | |
400 | incorrect_country | The value provided does not match the accepted convention ISO 3166-1 alpha-2 or ISO 3166-1 alpha-3. | |
401 | unautherised | You are not authorised to perform this request. | |
403 | forbidden | You do not have permissions to perform this request. | |
404 | not_found | Resource not found. | |
500 | internal_server_error | Internal server error. | |
501 | bad_gateway | Bad gateway. |