Errors
In this guide, we will talk about what happens when something goes wrong while you work with the API. We'll cover the status codes and error types you might encounter so you can efficiently troubleshoot any issues.
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 type and error message to identify the issue and resolve it quickly.
Before reaching out to support with an error, please check your request parameters, headers, and API usage against our documentation to ensure everything is formatted correctly.
Status codes
Here is a list of the different categories of status codes returned by the 1ClickImpact API:
- Name
2xx
- Type
- Description
A 2xx status code indicates a successful response.
- Name
4xx
- Type
- Description
A 4xx status code indicates a client error — usually related to invalid parameters or authentication issues.
- Name
5xx
- Type
- Description
A 5xx status code indicates a server error — if you encounter these repeatedly, please contact support.
Error types
Whenever a request is unsuccessful, the 1ClickImpact API will return an error response with an error type and message. You can use this information to understand better what has gone wrong and how to fix it.
Here is a list of the three error types supported by the 1ClickImpact API:
- Name
key_error
- Type
- Description
Authentication error related to your API key. Check that you're using the correct key for the environment and that it's properly formatted in your request headers.
- Name
invalid_request_error
- Type
- Description
Issue with request parameters or formatting. Check the error message for specific details about which parameter needs correction.
- Name
api_error
- Type
- Description
Internal server error on our end. If you receive this error consistently, please contact support with your request details.
Error response
{
"type": "key_error",
"message": "API Key does not exist",
}