Errors
In this guide, we will talk about what happens when something goes wrong while you work with the Reloadify API. Mistakes happen, and mostly they will be yours, not ours. Let us look at some status codes and error types you might encounter.
You can tell if your request was successful by checking the status code when receiving an API response. If a response comes back unsuccessful, you can use the error message to figure out what has gone wrong.
Always check the HTTP status code of the response before attempting to parse the response body. A 2xx status code indicates success, while 4xx and 5xx codes indicate an error.
Status codes
Here is a list of the different categories of status codes returned by the Reloadify API. Use these to understand if a request was successful.
- Name
200 OK- Description
The request was successful and the response body contains the requested data.
- Name
201 Created- Description
The resource was successfully created.
- Name
204 No Content- Description
The request was successful but there is no response body. Typically returned for DELETE requests.
- Name
400 Bad Request- Description
The request was malformed or missing required parameters.
- Name
401 Unauthorized- Description
The access token is missing, invalid, or expired.
- Name
403 Forbidden- Description
You do not have permission to access the requested resource.
- Name
404 Not Found- Description
The requested resource does not exist.
- Name
422 Unprocessable Entity- Description
The request body contains invalid data. Check the error message for details.
- Name
429 Too Many Requests- Description
You have exceeded the rate limit. Wait before making more requests.
- Name
500 Internal Server Error- Description
Something went wrong on our end. If this persists, contact support.
Error response format
When the API returns an error, the response body contains a JSON object with details about what went wrong. Use the message field to understand the issue and how to fix it.
Error response
{
"error": "Unauthorized",
"message": "The access token is invalid or has expired."
}
Validation error response
{
"error": "Unprocessable Entity",
"message": "Validation failed",
"errors": {
"email": ["is invalid"],
"first_name": ["cannot be blank"]
}
}