Error Format
When an error occurs, the response body contains an error code, error message, and optional parameters.
Part
Description
code
The status code representing the error.
message
The message explaining the error.
parameters
Optional. An array of attributes used to generate a different and/or localized error message for the client.
As an example, the application returns a code
of 401
and the following message
when an invalid signature
value is specified in the call GET V1/api/getorders/
.
{
"status_code": 401,
"reason_phrase": "Unauthorized",
"body": {
"message": "The consumer isn't authorized to access %resources.",
"parameters": {
"resources": "Magento_Sales::actions_view"
}
}
}
Last updated