5. API Error handling
This section describes the different error formats returned by the API system.
There are two types of error responses: request validation errors (422
) and all others (4XX
and 5XX
).
Validation Error
{
"errorCode": "VALIDATION_ERROR",
"message": "Input validation errors",
"errors": {
"amount": [
"[required]: Is a required non-nullable field",
"[int]: Must be an integer",
"[min:0]: Must be greater than 0",
"[max:999999999]: Must be less than 999999999"
]
}
}
Other Errors
{
"errorCode": "INVALID_OR_EXPIRED_SESSION",
"message": "Invalid session authentication or the session has expired."
}