Error Handling
2 minutes to read
If a request to Caspio REST API is successful, you will receive 200 OK or sometimes 201 Created status codes. All other status codes usually mean that something went wrong.
For resource URLs Caspio REST API supports 2 types of errors: client errors (4xx codes) and server errors (500 code). Client errors mean that something went wrong with the request. Server errors mean that something wrong happened on Caspio side. In such case you can only try to send your request later or contact Caspio support.
If you received a client error, the response will contain a special object with an error description.
Error Responses in JSON
{"Code":"Error Code", "Message":"Error Description", "Resource":"Request URL", "RequestId":"Caspio Requst Tracking Id"}
Error Responses in XML
<Error xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Code>Error Code</Code> <Message>Error Description</Message> <RequestId>Caspio Request Tracking Id</RequestId> <Resource>Request URL</Resource> </Error>Caspio Request Tracking Id is a special id generated by Caspio to track REST API requests. It is useful for debug/support purposes. Each response from Caspio REST API contains the custom header “X-Caspio-Request-ID” with Caspio Request Tracking Id.
Error Codes
HTTP Code | Code | Message |
400 Bad Request | IncorrectBodyParameter | Required body parameter absent or has incorrect format |
IncorrectQueryParameter | Required query parameter absent or has incorrect format | |
InternalError | Internal error | |
ProfileDisabled | Profile is disabled | |
SqlServerError | Depends on the situation (contains native SQL error text) | |
UnsufficientPrivileges | Not enough privileges to perform requested operation | |
403 Forbidden | IpForbidden | Access from specified IP is denied |
UnsecuredConnection | Unsecured connection is denied | |
404 Not Found | ObjectNotFound | Requested object not found |