The error response¶
The error response contains error and request parts.
In debug mode we add another symfony part and more global information.
Attributes¶
error.codeinteger
A code to represent the error.
error.messagestring
An error description.
error.localestring
The locale of the error message.
error.contextarray
An additional set of data related to the error.
error.statusCodeinteger
The HTTP error status code.
error.violationsobject
An optional entry added in case or data received are not valid (corresponding to error code 1).
request.methodstring
The HTTP request method.
request.urlstring
The requested url.
request.queryParamsobject
An object with query parameters received.
request.requestParamsobject
An object with request parameters received.
Example¶
{
"error": {
"code": 1,
"message": "Validation error",
"locale": "en",
"context": [],
"statusCode": 400,
"violations": {
"name": [
"This value should not be blank."
]
}
},
"request": {
"method": "POST",
"url": "https://app.yumisign.com/api/v1/examples",
"queryParams": {},
"requestParams": {}
}
}