About Error Response
Every REST request you send can return an error response.
All returned errors use the standard HTTP error code syntax with a more detailed error description in the returned body.
Body Layout
The body has the same layout for every returned error response:
JSON formated UTF-8 string {"status":...,"code":...,"message":"..."}
Parameters:
It uses the following parameters:
- status: this parameter follows the HTTP error code returned by the server
- code: this parameter is composed as status + internal number, it provides a more fine grained error specification
- message: human readable string (English only) associated with the error code
Example
Below is an example of an error message:
Error Example
HTTP 401: Unauthorized { "status":401, "code":4010, "message":"invalid authorization token" }
Possible Error Codes
The list of the possible error codes is shown below:
HTTP status code | status | code | message |
---|---|---|---|
400 Bad Request | 400 | 4000 | input contains invalid json |
400 Bad Request | 400 | 4001 | max number of realms reached |
400 Bad Request | 400 | 4002 | unknown realm / user combination |
400 Bad Request | 400 | 4003 | unknown realm id |
401 Unauthorized | 401 | 4010 | invalid authorization token |
401 Unauthorized | 401 | 4011 | missing authorization token |
500 Internal Server error | 500 | 5000 | Server software error occurred |