Errors structure¶
Error message structure¶
The fields in the table below make up the main structure of the request's return when there is an error.
Field | Description | Required |
---|---|---|
slug |
Identification of the error that represents the business scenario in question. | Yes |
message |
Descriptive message of the error that occurred. | Yes |
details |
Details of the error that occurred. | No |
Examples¶
Error 400 - Bad Resquest¶
{
"slug":"BAD_REQUEST",
"message":"Bad Resquest",
"details":[
{
"field":"name",
"location":"query",
"slug":"INVALID_PARAMETER",
"message":"Invalid parameter"
}
]
}
Error 401 - Unauthorized¶
Error 403 - Forbidden¶
Error 404 - Not Found¶
Error 409 - Conflict¶
{
"slug":"CONFLICT",
"message":"Conflict",
"details":[
{
"field":"condition",
"location":"body",
"slug":"ENTITY_WITH_SAME_KEY_ALREADY_EXISTS",
"message":"There is already an condition"
}
]
}
Error 422 - Unprocessable Entity¶
{
"slug":"UNPROCESSABLE_ENTITY",
"message":"Unprocessable entity",
"details":[
{
"field":"condition",
"location":"body",
"slug":"INVALID_PARAMETER_VALUE",
"message":"Invalid condition type"
}
]
}
Error 429 - Too Many Requests¶
{
"slug": "TOO_MANY_REQUESTS",
"message": "You have sent too many requests in a given amount of time"
}