Understand and resolve errors returned by the Zonos GraphQL API.
GraphQL
The Zonos API returns two types of errors: HTTP status codes for transport-level failures, and GraphQL errors for application-level issues. Most errors are GraphQL errors that include a classification in the extensions field to help identify the cause and appropriate resolution.
Application-level errors are returned as a list in the errors field of the response body. Each error includes a message, the path of the operation that failed, and an extensions object with the error type and request ID.
API errors
API errors
Understand and resolve errors returned by the Zonos GraphQL API.
GraphQL
The Zonos API returns two types of errors: HTTP status codes for transport-level failures, and GraphQL errors for application-level issues. Most errors are GraphQL errors that include a classification in the
extensionsfield to help identify the cause and appropriate resolution.HTTP status codes
HTTP errors are returned when a request cannot be processed at the transport level.
GraphQL error format
Application-level errors are returned as a list in the
errorsfield of the response body. Each error includes amessage, thepathof the operation that failed, and anextensionsobject with the error type and request ID.{"errors": [{"message": "Description of the error","path": ["landedCostCalculate"],"extensions": {"errorType": "BAD_REQUEST","requestId": "req_abc123"}}]}Error classifications
The
extensions.errorTypefield indicates the category of the error and the recommended action.BAD_REQUESTNOT_FOUNDUNAVAILABLEPERMISSION_DENIEDFAILED_PRECONDITIONINTERNALUNKNOWNWas this page helpful?