As the HTTP status code returns a basic information about an error, we provide additional data in response body for further error indication. All errors have following format:
{
"timestamp": "{{iso_8601_timestamp}}",
"status": {
"code": "{{HTTP_STATUS_CODE}}",
"message": "{{HTTP_STATUS_MESSAGE}}"
},
"errors": ["{{LIST_OF_DETAIL_ERRORS}}"]
}
{
"timestamp": "2016-12-21T11:17:56.397Z",
"status": {
"code": "405",
"message": "Method Not Allowed"
},
"errors": [
{
"message": "Method POST is not allowed for resource /users."
}
]
}
{
"timestamp": "2016-12-21T11:17:56.397Z",
"status": {
"code": "422",
"message": "Unprocessable Entity"
},
"errors": [
{
"field": "recipient",
"rejected_value": null,
"message": "Property 'recipient' cannot be null."
}
]
}