Errors
API reference / General provisions / ErrorsErrors
Each API call returns an HTTP status code that reflects the nature of the response. We have done our best to follow conventions about HTTP status codes.
Any unsuccessful request returns a 4xx or 5xx error.
A range of 4xx means there was a problem with the request, such as a missing parameter. A 5xx range means something went wrong on our end.
All error responses will contain an object with these attributes:
Paramenter | Description |
status | Response status: "OK" or "FAIL" |
data | Object with response data |
data: name | HTTP status name |
data:message | Message in the selected query language |
data: code | Internal system response code (0 - successful response) |
data:status | Numeric HTTP response status |
data: previous | Internal system diagnostics in case of an erroneous response |
Sample response:
{ "status": "FAIL", "data": { "name": "Not Found", "message": "Page not found.", "code": 0, "status": 404, "previous": { "name": "Invalid Route", "message": "Unable to resolve the request \"\".", "code": 0 } } }
The e-Cont.md API returns the following HTTP status codes:
200 - OK – Request succeeded
201 - Created – A resource was created
204 - No Content – Request succeeded but there is no response body
400 - Bad Request – Invalid request parameters
401 - Unauthorized – Incorrect or missing API key
403 - Forbidden – You do not have permission to view a resource or perform an action
404 - Not Found – The specified resource could not be found
429 - Too Many Requests – You’re moving too fast! Slow down!
500 - Internal Server Error – There was a problem on our end