Error Handling

Last changes: 03-30-2021

Error Format

{
    "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}
        },
        ...
        {},
        {}
    ]
}
FieldDescription
traceIdInternally generated trace_id for this error message so it can be found easily in the logs.
messageA predefined string which describes the error.
The purpose of the message is to allow for future usage of translation.
codeA pre-defined code from the list below.
propertyThe property from the request object which the error is linked to.
contextA 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":
}

Possible errors during API POST requests

HTTP CodeError CodeMessageContext
400value_out_of_boundsValue out of bounds.
Value must be between {{context.minimum}} and {{context.maximum}}
{
"minimum": "",
"maximum": ""
}
400invalid_propertyThe provided property is now allowed. 
400missing_mandatory_propertyMissing mandatory property. Cannot find {{error.property}}. 
400incorrect_typeIncorrect value for {{error.property}}. Expected {{context.type}}.{
"type": ""
}
400missing_mandatory_query_parameterMissing mandatory query parameter. Cannot find {query parameter}. 
400invalid_value_lengthIncorrect value length for {{error.property}}. Expected string with minimum length {{context.minLength}} and maximum length {{context.maxLength}}.{
"minLength": "",
"maxLength": ""
}
400object_not_foundIncorrect value for {{error.property}}. The reference provided does not exist. 
400incorrect_valueIncorrect value for {{error.property}}. Expected values are {{error.context.allowed_values}}.{
"allowedValues": ""
}
400incorrect_currencyThe value provided does not match the accepted convention ISO 4217. 
400past_dateThe {{error.property}} provided is in the past. 
400malformatted_requestThe provided request is with incorrect format. 
400processing_errorThe request failed during processing. Please check the data provided and try again. 
400incorrect_countryThe value provided does not match the accepted convention ISO 3166-1 alpha-2 or ISO 3166-1 alpha-3. 
401unautherisedYou are not authorised to perform this request. 
403forbiddenYou do not have permissions to perform this request. 
404not_foundResource not found. 
500internal_server_errorInternal server error. 
501bad_gatewayBad gateway.