Errors
Understanding OCTO Error Codes and messages.
We will respond to every request with either a
200 OK
if everything went ok, or a 400 Bad Request
if it didn't. In the case of the 400 Bad Request
the response body will look like this:{
"error": "INVALID_PRODUCT_ID",
"errorMessage": "The Product ID was invalid or missing",
"productId": "123"
}
You will always receive
error
and errorMessage
which is defined as: FIELD | DESCRIPTION |
---|---|
error | The error code, a table of possible error codes is shown below. |
errorMessage | A human readable error message |
Depending on the error code we also may pass additional fields which can make it easier to understand what's wrong in your request. In the example above we provide
productId
and pass the value that was sent in the request, indicating that the productId of 123
is not valid.Below is a list of the error codes and a description of what each means. Further down this page we also provide an example request body for all the error codes that provide additional attributes.
CODE | DESCRIPTION |
---|---|
INVALID_PRODUCT_ID | Missing or invalid productId in the request |
INVALID_OPTION_ID | Missing or invalid optionId in the request |
INVALID_UNIT_ID | Missing or invalid unitId in the request |
INVALID_AVAILABILITY_ID | Missing or invalid availabilityId in the request |
INVALID_BOOKING_UUID | Missing or invalid booking uuid, or if you're confirming the booking, the booking may have expired already. |
BAD_REQUEST | If your request body is not formatted correctly, you have missing required fields or any of the data types are incorrect. |
UNPROCESSABLE_ENTITY | If your request body is technically correct but cannot be processed for other reasons. e.g. you tried to cancel a booking after the cancellation cutoff had elapsed. |
INTERNAL_SERVER_ERROR | If the backend server is down or there's a network outage. |
UNAUTHORIZED | If the API Key in the Authorization header to an endpoint that requires authentication was not sent. |
FORBIDDEN | You sent an API Key that was invalid or has been revoked by the backend system. Or you're trying to access an endpoint/resource that you do not have access to. |
RATE_LIMIT_EXCEEDED | Concurrent API calls may lead to a high number of requests per minute, triggering a throttling event. In this case our system will reply with this error, the HTTP Response Code with be 429. To avoid this, see our documentation with regards to Rate Limits and how to handle these events. |
As explained above it's also possible for specific error codes to have additional attributes that help you diagnose what is wrong with your request. Below are all the specific errors that contain these attributes:
{
"error": "INVALID_PRODUCT_ID",
"errorMessage": "The Product ID was invalid or missing",
"productId": "123"
}
{
"error": "INVALID_OPTION_ID",
"errorMessage": "The Option ID was invalid or missing",
"optionId": "321"
}
{
"error": "INVALID_UNIT_ID",
"errorMessage": "The Unit ID was invalid or missing",
"unitId": "senior"
}
{
"error": "INVALID_AVAILABILITY_ID",
"errorMessage": "The Availability ID was invalid or missing",
"availabilityId": "2020-01-01T10:30+08:00"
}
Last modified 3mo ago