Errors

Error condition is indicated response with one of the 4xx HTTP status code and the content containing short error descriptor in either JSON or XML format unless otherwise noted. If the method is requested to return XML format, error’s output format will be XML, for all the other formats error output format is JSON:

{  
    "error":  403,// the copy of HTTP status  
    "code":    3200, // message code
    "message": "View does not exist",// message text  
    "source":  "Some View"// optional location hint, e.g. parameter name 
}
<Error>  
    <error>403</status><!-- HTTP status -->  
    <code>3200</code><!-- message code -->  
    <message>View does not exist</message><!-- message text -->  
    <source>Some View</source><!-- optional hint -->  
</Error>

We use limited subset of 4xx HTTP status codes.

Code Status Description
400 Bad request One of the request parameters is missing or malformed. Check “source” property of the error descriptor for the hint.
401 Unauthorized No authorization is provided. Interactive clients can bring up login/password prompt. No error descriptor is returned.
403 Forbidden Invalid authentication token or user credentials; Access to the table, column or view is denied;
405 Invalid Method Invalid method name
409 Conflict Unable to perform record creation or update due to database constraints.
413 Request Entity Too Large Client attempts to send more than 20Mb of data at once. No error descriptor is returned.
414 Request URI Too Long Client attempts to send more than 16K of data in a query string. No error descriptor is returned.
415 Invalid Media Type Client sends the data in a format API does not understand.
500 Internal Server Error Internal server error; Error from a data access backend – these ones will be eventually re-qualified to error codes above.