Error handling
Learn how to handle errors and other messages.
HTTP status error codes
The following table lists the standard HTTP status codes used by the API:
Code | Resolution |
---|---|
400 Bad Request | This status code indicates that there might be invalid syntax in the request body. |
401 Unauthorized | Ensure you included a valid authorization token in your request. |
403 Forbidden | This status code indicates that the server understood the request but refuses to authorize it. |
404 Not Found | This status code indicates that the server cannot find the requested resource. |
413 Payload Too Large | This status code indicates that the request is too large for the server to process. |
429 Too Many Requests | This status code indicates that the client has sent too many requests in a given period of time. |
400 Response example
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Content-Type: application/json
x-envoy-upstream-service-time: 3
Request-Context: appId=cid-v1:a9155011-1f33-4795-83b1-b563704f88e2
Date: Mon, 21 Apr 2025 18:59:50 GMT
{
"message": "Session data is missing or invalid."
}
401 Response example
HTTP/1.1 401 Unauthorized
Content-Length: 0
Request-Context: appId=cid-v1:a9155011-1f33-4795-83b1-b563704f88e2
WWW-Authenticate: Bearer error="invalid_token"
Date: Mon, 21 Apr 2025 18:55:34 GMT
403 Response example
HTTP/1.1 403 Forbidden
Content-Length: 0
x-envoy-upstream-service-time: 7
X-Rate-Remaining-Calls: 9
Request-Context: appId=cid-v1:a9155011-1f33-4795-83b1-b563704f88e2
Date: Wed, 23 Apr 2025 13:22:21 GMT
413 Response example
HTTP/1.1 413 Request Entity Too Large
Content-Length: 101
Request-Context: appId=cid-v1:a9155011-1f33-4795-83b1-b563704f88e2
Date: Thu, 24 Apr 2025 21:40:22 GMT
{
"message": "Payload too large: The request body size exceeds 26214400 bytes or 1000 products"
}
429 Response example
TTP/1.1 429 Failed to fetch
Content-Length: 22
Content-Type: application/json
Retry-After: 24
X-CaughtMetric-429: true
Request-Context: appId=cid-v1:a9155011-1f33-4795-83b1-b563704f88e2
Date: Mon, 21 Apr 2025 18:44:11 GMT
Rate limit is exceeded
Updated 5 months ago