Appearance
HTTP codes
When integrating with the API, developers may encounter certain standard errors that provide insight into the nature of the issue and how to resolve it. These errors are designed to ensure consistent and predictable interactions. Below are the HTTP status codes used in this API:
HTTP Codes | Description |
---|---|
200 | On success when using synchronous endpoints |
202 | On success when using asynchronous endpoints |
401 | Unauthorized or Invalid API Key |
404 | When a resource is not found |
422 | When validation fails |
429 | API Throttling |
500 | An unexpected error occurred during the operation |
502 | Bad Gateway |
Error types
While an HTTP code may give you enough context in certain situations, it might not be enough to figure out the nature of the error. Whenever, there is a non-2XX response, the API returns an error
object with a relevant type
and a human readable message
.
E.g
json
{
"error": {
"type": "INVALID_API_KEY",
"message": "Forbidden"
}
}
The table below provides an overview of common response types, their descriptions, and associated HTTP status codes to help you debug and handle these errors effectively.
Response Type | Default Status Code | Description |
---|---|---|
ACCESS_DENIED | 403 | Access denied due to failed authorization. |
API_CONFIGURATION_ERROR | 500 | Invalid API configuration, such as incorrect endpoint or response mapping. |
AUTHORIZER_CONFIGURATION_ERROR | 500 | Failed to connect to the authorizer. |
AUTHORIZER_FAILURE | 500 | Authorizer failed to authenticate the caller.. |
BAD_REQUEST_PARAMETERS | 400 | Invalid request parameters. . |
BAD_REQUEST_BODY | 400 | Invalid request body. . |
EXPIRED_TOKEN | 403 | Authentication token has expired. . |
INTEGRATION_FAILURE | 504 | Integration request failed. . |
INTEGRATION_TIMEOUT | 504 | Integration request timed out. . |
INVALID_API_KEY | 403 | Provided API key is invalid.. |
INVALID_SIGNATURE | 403 | AWS signature validation failed. |
MISSING_AUTHENTICATION_TOKEN | 403 | Missing or invalid authentication token.. |
QUOTA_EXCEEDED | 429 | Usage quota exceeded. |
REQUEST_TOO_LARGE | 413 | Request exceeds allowed size. Defaults to HTTP content length exceeded 10485760 bytes . |
RESOURCE_NOT_FOUND | 404 | Requested resource does not exist.. |
THROTTLED | 429 | Request throttled due to rate limits.. |
UNAUTHORIZED | 401 | Caller failed authentication. |
UNSUPPORTED_MEDIA_TYPE | 415 | Payload has an unsupported media type. |
WAF_FILTERED | 403 | Request blocked by a Web Application Firewall (WAF). |
In addition to the list above, each endpoint has its own unique set of error types, which are described in their respective sections.