If status 4xx is returned you can read additional information from returned json object.
- message - Human readable error explanation.
- code - Error code. Possible values depends on method but there is few common error codes.
- field - Which field of payload object caused error. NULL when error is not related to particular field
Common error codes:
- AUTH - Authentication failure. There are two possible reasons: disabled API access od invalid ApiKey provided. Used when returned HTTP status code is 401.
- HTTP_METHOD_NOT_ALLOWED - HTTP method not allowed, please verify HTTP method of the request. Used when returned HTTP status code is 405.
- INVALID_METHOD_URL - HTTP method not allowed, please verify HTTP method of the request. Used when returned HTTP status code is 404.
- QUOTA_EXCEEDED - Too many requests in a given amount of time. Used when returned HTTP status code is 429.
- INVALID_JSON_PAYLOAD - Json object you sent cannot be interpreted by server. Please check object format and provided data due to api specification.
- UNKNOWN_ERROR - We don't know what happened but will investigate.