Error handling
Error Response Format
{ errors: [ { code: SOME_ERROR_CODE message: "Error-specific verbiage." }, { code: SOME_OTHER_ERROR_CODE message: "Error-specific verbiage." }, ] }
Possible Error Codes
Code | Description |
---|---|
ACCESS_DENIED | You've attempted to use a feature that is not available under your current subscription plan. |
ENTITY_NOT_FOUND | The requested entity (e.g., city/country/region) couldn't be found. |
INCOMPATIBLE | The request is syntactically valid but is not supported in the context of the current resource. (For example, this can happen if you try to sort regional cities by countryCode - invalid in this case since all cities within a given region will by definition be in the same country.) |
PARAM_INVALID | The request contains a parameter value in the wrong format or that doesn't make semantic sense. |
PARAMS_MUTUALLY_EXCLUSIVE | The request contains one or more parameters that cannot coexist. |
REQUEST_UNPROCESSABLE | The request is syntactically valid but semantically doesn't make sense. (For example, you request admin-division details for an id that doesn't represent a division.) |