Errors
4 min
Each request has specific errors that are detailed throughout the documentation. This document contains a general description of errors that could occur across all request types and a description of the common error response format.
There are two errors formats which denote generic/default and custom errors which can be resource or action specific.
Default Error
Default Error Response Attributes:
message - Contains brief information about the nature of the error
Custom Error
Custom Error Response Attributes:
- errorCode - This a custom Error Code that is returned to provide more context. This is not directly related to a HTTP Status Code as it can mean request or resource specific errors as described below.
- errorMessage - The summary of the error which occurred.
- errorDetails - Detailed information about the nature of the error. This can contain FourKites® specific errors such as request validation, which will help understand and fix
- occuredAt - The timestamp in UTC of when the error occurred. This can be used for analysis along with the requestId.
- requestId - If you need to contact us about a specific request, providing this request identifier will ensure quick resolution.
Custom Error Codes:
Error Code | Error Message | Equivalent HTTP Status Code |
|---|---|---|
2001 | Message Not Readable | 400 |
2002 | Validation Exception | 400 |
2003 | Method not supported | 405 |
8886 | Resource Not Found | 404 |
8887 | Access Denied | 403 |
9999 | An Internal Error Has Occurred | 500 |
Sample Default Error
{
"message": "No API key found in request"
}
Sample Custom Error
{
"errorCode": 2002,
"errorDetails": ["Invalid value for param: shipment.type"],
"errorMessage": "Validation Exception",
"occurredAt": "2020-07-28T06:46:30Z",
"requestId": "brlfhvhghpuac6sl1jrg"
}