Errors

Speed employs conventional HTTP response codes to indicate the success or failure of an API request. Our error responses are further classified into type and message attributes.

In general, 200 HTTP codes correspond to success. Whereas, codes in the 4XX range indicate an error caused by the information in the request body (e.g., a required parameter was omitted or an invalid value was added to the parameter, etc.). Codes in the 5XX range are rare in nature, indicating an error with Speed servers.

A comprehensive breakdown of all error codes:

HTTP CodeError Logic
200 - OKThe request has succeeded.
201 - CreatedThe request has been fulfilled new entity is created with success
202 - AcceptedThe request has been accepted for processing, but the process is yet to complete.
204 - No ContentThe request has succeeded but returns has no message body.
400 - Bad RequestThe request was unacceptable, often due to incorrect or missing required parameter.
401 - UnauthorizedThe request requires user authentication. If the request included authorization credentials, authorization has been refused for those credentials.
402 - Request FailedThe parameters were valid but the request failed.
403 - ForbiddenThe API key doesn't have permissions to perform the request.
404 - Not FoundThe requested resource doesn't exist.
429 - Too Many RequestsToo many requests hit the API too quickly. Please wait until you pass the limit and attempt the call again.
500, 502, 503, 504 - Server ErrorsThere are multiple possible reasons for a 5XX error. The server is currently unable to handle the request due to a temporary condition which will be alleviated after some delay. You can choose to resend the request.

Error Schema

Speed platform APIs always return a response. If an endpoint request fails, the response body includes an errors array to aid in diagnosing the problem. The same is explained in the following section.

A type attribute, indicates the nature of the problem, while additional attributes provide details about the problem. The type and message attributes will always be returned in these response bodies. Any additional attributes, such as param or reason, will vary depending on the type of the error.

Attributes

Type string
The error type is classified broadly and returned.


Message string
A user-friendly message providing details about the error is returned.


Param string
If the error is parameter-specific, the parameter related to the error is returned.


Questions? Contact us