If you receive an error code when making an API call it should fall within one of two categories; client side or server side.
The 4xx class of error codes is meant to indicate that the client failed to provide a valid request. Below are the most common 4xx class of error codes you might encounter when using the API.
400 (Bad Request)
This error indicates that there is a syntax error in the request and the request has therefore been denied. The client should not continue to make similar requests without modifying the syntax or the requests being made.
This error indicates that the API request being made did not contain the necessary authentication credentials and therefore the client was denied access. If authentication credentials were already included then the Unauthorized response indicates that authorization has been refused for those credentials. In the case of the API, authorization credentials refer to your API key.
404 (Not Found)
This error indicates that the server has not found a match for the API request being made. No indication is given whether the condition is temporary or permanent.
415 (Unsupported Media Type)
This error indicates that the server is refusing to service the request because the body of the request is in a format that is not supported.
429 (Rate Limit Exceeded)
This error indicates that the application has exhausted its maximum number of allotted API calls allowed for a given duration. If the client receives a Rate Limit Exceeded response the client should process this response and halt future API calls for the duration, in seconds, indicated by the Retry-After header. Applications that are in violation of this policy may have their access disabled to preserve the integrity of the API. Please refer to our Rate Limiting documentation for more information on determining if you have been rate limited and how to avoid it.
The 5xx class or error codes indicates that the server is aware it has errored or is incapable of performing the request. Below are the most common 5xx class of error codes you might encounter when using the API.
500 (Internal Server Error)
This error indicates an unexpected condition or exception which prevented the server from fulfilling an API request.
503 (Service Unavailable)
This error indicates the server is currently unavailable to handle requests because of an unknown reason. The Service Unavailable response implies a temporary condition which will be alleviated after some delay.