Handling Errors
The following error codes may come across all endpoints.
Standard Error codes
HTTP Code | Error Response | Description |
---|---|---|
400 | {"code":"VALIDATION_FAILED","message":"Failed to validate constraints."} | Validation failed for request body parameters. This could also be a request body parsing error. |
400 | {"code":"INVALID_PARAMETERS","message":"Invalid Parameters in Request Body"} | The request validation failed due to incorrect parameters. |
400 | {"code":"MERCHANT_ID_HEADER_NOT_FOUND","message":"MerchantId header not found"} | The Merchant ID header was not found in the request headers. |
400 | {"code":"IDEMPOTENCY_FAILURE","message":"Request is not idempotent"} | The request is not idempotent. This typically occurs if the idempotency header is not empty and not unique. |
401 | {"code":"MISSING_TOKEN","message":"Unable to find Bearer token for authentication."} | The Bearer token for authentication was not found. This usually means the Merchant signature is missing in headers. |
401 | {"code":"MERCHANT_ID_HEADER_NOT_FOUND","message":"MerchantId header not found"} | The Merchant ID header was not found in the request headers, or the Merchant signature is invalid. |
401 | {"code":"INVALID_TOKEN","message":"Invalid Bearer token."} | The Bearer token for authentication is invalid. This usually means the Merchant signature is invalid. |
403 | {"code":"KYB_NOT_INITIATED","message":"Merchant kyb not initiated"} | The Merchant KYB (Know Your Business) process has not been initiated. |
403 | {"code":"KYB_PENDING","message":"Merchant Kyb pending."} | The Merchant KYB process is still pending. |
404 | {"code":"RECORD_NOT_FOUND","message":"Unable to find the record requested."} | The requested record could not be found. |
Unexected error codes
Please contact the Zamp team if you face the below unexpected errors.
HTTP Code | Error Response | Description |
---|---|---|
400 | { "code":"FAILED_TO_GET_MERCHANT_CONFIG", "message":"Failed to get merchant config"} | Error getting merchant configurations 2. Merchant configurations not present. Please contact Zamp if this happens |
500 | {"code":"UNKNOWN_EXCEPTION","message":"An unknown exception occurred. Please try again later."} | An unknown internal server error occurred. This may also happen due to a security validation |