5.216 Error Messages

Below is an explanation of what error message format to expect when an HTTP status code other than 20x is returned. All error codes have a response code of 400 or greater.

5.216.1 400 Bad Request

This response code is returned when the request itself is at fault, such as when trying to modify a resource with an empty PUT request body or when trying to create a new resource with invalid parameters. The response body is as follows:

{
  "messages":[
    "Message describing error",
    "Possible prompt to take action"
  ]
}

5.216.2 401 Unauthorized

This response code is returned when authentication credentials are not supplied or are invalid. The response body is as follows:

{
  "messages":[
    "You must be authenticated to access this area"
  ]
}

5.216.3 403 Forbidden

This response code is returned when the credentials supplied are valid, but the permissions granted are insufficient for the operation. This occurs when using application accounts (see Access Control) with limited access.

{
  "messages":[
    "You are not authorized to access this area"
  ]
}

5.216.4 404 Not Found

This response code is returned when the request specifies a resource that does not exist. The response body is as follows:

{
  "messages":[
    "The resource with id 'uniqueId' was not found"
  ]
}

5.216.5 405 Method Not Allowed

This response code is returned when a resource does not support the specified HTTP method as an operation. The response body is as follows:

{
  "messages":[
    "The specified HTTP method is not allowed for the requested resource"
  ]
}

5.216.6 500 Internal Server Error

This indicates that there was an internal server error while performing the request, or that an operation failed in an unexpected manner. These are the most serious errors returned by MWS. If additional information is needed, the MWS log may contain further error data. The response body is as follows:

{
  "messages":[
    "A problem occurred while processing the request",
    "A message describing the error"
  ]
}

Related Topics 

© 2016 Adaptive Computing