Errors
TIDY uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a job failed, etc.). Codes in the 5xx range indicate an error with Tidy's servers.
CODE | DESCRIPTION |
---|---|
400 - Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 - Unauthorized | No valid API Key provided. |
402 - Request Failed | The parameters were valid but the request failed. (e.g. a job failed) |
403 - Forbidden | The API key doesn't have permissions to perform the request. |
404 - Not Found | The requested resource doesn't exist. |
429 - Too Many Requests | Too many requests hit the API too quickly. |
500, 502, 503, 504 - Server Errors | Something went wrong on TIDY's side. |
Every error has a Type and a Code. Type is more generic and could be used to handle a group of errors and Code is a more specific error.
CODE | TYPE | DESCRIPTION |
---|---|---|
AuthenticationError | authentication_error | This action requires authentication and your request did not have either an incorrect or invalid API Key. |
InvalidParamsError | invalid_request_error | One or more parameters you sent are not valid. Try checking the documentation to ensure that you have all of the required params. |
ResourceNotFoundError | invalid_request_error | A parameter, usually an ID, sent to use in a lookup has returned no records. Usually it means that the wrong ID or parameter was sent. |
RateLimitError | rate_limit_error | You have exceeded the maximum attempts in a period of time. Check our for more information. |
UnexpectedError | api_error | An unexpected error occured. Try again and if it persists, please reach out to |
The Error Object has the following attributes: