Handling Errors
The InsightIQ API uses standard HTTP response codes to indicate success or failure of a request.
Requests in the 2xx range indicate success.
4xx range indicate failure in the information provided (invalid credentials, missing params)
5xx range indicate an error with InsightIQ's servers (exceptional cases).
Error response object
Error responses will include detailed attributes to help you identify and resolve issues quickly.
Attribute | Description |
|---|---|
| Category of error |
| Specific error code to help you identify the error |
| Helpful, human-readable error (typically with a hint about how to resolve) description |
| HTTP status code of the response |
| Unique request ID for the API request (helpful in debugging and reporting the error to InsightIQ) |
An example is,
{
"error": {
"type": "INVALID_REQUEST_PARAMETERS",
"error_code": "incorrect_account_id",
"message": "Requested account id does not exist",
"http_status_code": 400,
"request_id": "c748e69e-0794-443c-9e0e-dba952d0096f"
}
}The older parameters code and status_code are deprecated, and set to be removed from the response in a future version. Please make sure to migrate to error_code and http_status_code respectively, on or before 1 May 2022.
HTTP status codes andd Error types
The following table outlines the different error types you could get based on the status code in the HTTP response:
HTTP Status Code | Error | Description |
|---|---|---|
400 |
| The request is invalid. |
401 |
| The request is unauthorized. |
403 |
| The request is not allowed. |
404 |
| The requested record could not be found. |
413 |
| The request size is larger than can be handled. |
415 |
| The request has an unsupported content-type or content-encoding. |
429 |
| Rate limit breached. |
500 |
| The server could not process the request. |
503 |
| The server or the application is down. |
504 |
| The server is taking too long to respond. |
Common error codes
The following table outlines the different error_codes you could get based on the specific error with the API request:
| Message |
|---|---|
| Requested workplatform id does not exist |
| Pass workplatform id in uuid format |
| Pass a valid workplatform name |
| Pass a valid status as boolean |
| Pass a valid client ID and secret |
| Request has incorrect data format for the event |
| Pass from_date in the YYYY-MM-DD format |
| Pass a limit between 1 and 100 |
| Pass an offset between 0 and {number of items} |
| Request has incorrect product value, please pass one or more of {list of existing valid product values} |
| to_date cannot be lesser than from_date |
| to_date cannot be greater than today |
| Pass to_date in the YYYY-MM-DD format |
| Pass url in a valid https format |
| Pass a valid from_date in the YYYY-MM-DD format |
| Request has missing parameters, add {missing_parameter_name} and try again |
| Too many requests made too quickly, please try again in a while |
| Request has an invalid filter query, please pass a properly formatted query in filters |
| Request has an empty value for {parameter_name} |
| Request has an empty array for {parameter_name} |
| Request has an invalid query parameter {parameter_name} |
| {parameter_name} in request does not support arrays, please repeat the request with one value at a time |
| Pass a properly formatted array in {parameter_name} |
| {parameter_name} does not support the given operator, please use one of {list of valid operators} |
| Request has incorrect format value, please pass one or more of {list of format values} |
| Request has incorrect type value, please pass one or more of {list of type values} |
| The path specified in request does not exist |
| Incoming request size is larger than supported by the server |
| These credentials have been disabled, please contact the InsightIQ team |
| The auth token in the request is invalid. |
| Our servers are not available to process this request, please try again in a while |
| Our servers are taking too long to process this request, please try again |
| Requested commenter id does not exist |
| External ID cannot be greater than 100 characters |
| from_date cannot be greater than today |
| The JSON body in the request is not formatted properly, please validate the body before retrying |
| The JSON body in the request is not valid for the given endpoint and operation, please validate the body before retrying |
| Internal data for this resource is corrupted, please contact InsightIQ with the request details |
| The redirect URI in the request is not supported |
| Request array for {parameter_name} has exceeded the limit, please send maximum {supported_number_of_items} items in a request |
| There was an error processing this request, please contact us with the request ID |
| Pass a valid to_date in the YYYY-MM-DD format |
| The product specified in the request is not supported for this account |
| Data for this request is not synced yet, please check sync status of the account before trying again |
| Data for this request is not available, please contact us with the request ID |
Debugging and Support
If you are still facing issues, please write to us with your request_id and other details at [email protected].