Developers
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 http status codes 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 error codes 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 error object format the error object has the following attributes { "object" "error", "type" "{type of the error}", "code" "{code of the error}", "message" "{message of the error}", "invalid params" \[], "more info" "{error documentation url}", } examples \# when the `zipcode` param is invalid { "object" "error", "type" "invalid request error", "code" "invalidparamserror", "message" "one or more parameters you sent are not valid try checking the documentation to ensure that you have all of the required params ", "invalid params" \[{ "zipcode" "not a valid usps zip code " }], "more info" "{error documentation url}", }