Schemas/Objects
Error
Error codes, messages, and field validation failures.
Type
objectProperties
messagestringOptionalcodestringOptionalA stable code where one is named in this file, such as
GATEWAY_REQUEST_CONFLICT.violationsarray of objectOptionalWith
code: VALIDATION_ERROR: each field (<unknown>for a field this contract does not have) and the rule it broke.violations[].fieldstringRequiredviolations[].codestringRequired
Example values
{
"code": "GATEWAY_LINK_NOT_FOUND"
}{
"message": "Invalid request",
"code": "VALIDATION_ERROR",
"violations": [
{
"field": "amountUsd",
"code": "string.pattern.base"
}
]
}JSON schema
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string",
"description": "A stable code where one is named in this file, such as `GATEWAY_REQUEST_CONFLICT`."
},
"violations": {
"type": "array",
"description": "With `code: VALIDATION_ERROR`: each field (`<unknown>` for a field this contract does not have) and the rule it broke.",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"field",
"code"
]
}
}
},
"examples": [
{
"code": "GATEWAY_LINK_NOT_FOUND"
},
{
"message": "Invalid request",
"code": "VALIDATION_ERROR",
"violations": [
{
"field": "amountUsd",
"code": "string.pattern.base"
}
]
}
]
}Next in schemasChallengeRequest