Error Handling
Vaxtor API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:
- Codes in the
2xxrange indicate success. - Codes in the
4xxrange indicate that the request validation failed (e.g., a required parameter was not provided). - Codes in the
5xxrange indicate an error with Vaxtor’s services (these are not to be expected).
Error Structure
The JSON structure for any API error is always consistent, as shown in the example below. Errors are indicated by an HTTP status code in the 4xx or 5xx range.
json
{
"type": "BadRequestException",
"title": "The OCR region selection feature is not available for your current plan. Upgrade your plan or remove the http header.",
"status": 400,
"detail": "The OCR region selection feature is not available for your current plan. Upgrade your plan or remove the http header.",
"errors": {},
"traceId": "00-22f770f92efd79d211b9a44f583b24e9-589ff90be605bb01-01"
}Error Object description
| Field | Data Type | Description |
|---|---|---|
| type | string | The type of the error |
| title | string | A human readable description of the error |
| status | number | The http status code |
| detail | string | A human readable description of the error |
| errors | object | A collection of validation errors. Applicable to bad request only. |
| traceId | string | An internal error id |