Query REST Service error response
When an error occurs, the service returns an error response containing the relevant HTTP status code. The table below lists the possible HTTP status codes. Each status code relates to a certain error type:
Status code | Description |
---|---|
400 Bad Request | Could not parse request. |
401 Unauthorized | No authentication credentials provided or authentication failed. |
403 Forbidden | Authenticated user does not have access. |
404 Not Found | Resource not found. |
500, 501, 502, 503, etc | An internal server error occurred. |
If available, the response body also contains an error message.
E.g., the system returns the following response if the mandatory q URL parameter is empty:
HTTP/1.1 400 Bad Request
{
"messages": {
"errors": [
"Parameter 'q' is mandatory."
]
},
"response": null
}