You may encounter some errors while using the APIs and making API requests. Below, you’ll find the structure of the error response for individual and bulk actions, and a list of the different error codes you may get and what they mean.
Here’s an example of what the structure of the application-specific GraphQL error for an individual action would look like:
{ "errors": [ { "extensions": { "clientError": [ **{ "code": "forbidden", "param": {} }** ] } } ], "data": {} }
Each application code contains three attributes:
The error code, and the parameter (or param, as it's commonly known.)
The param attribute is used as a container to hold the attributes which are used to describe the error in detail.
For bulk actions, the index attribute will be added, and an integer value will be included inside the param attribute container to convey that the object in the specified index has the corresponding error. Here’s what an example of that would look like:
{ "errors": [ { "extensions": { "clientError": [ { "code": "mandatory_validation_failed", "param": { "**index**": 1, "attributes": [ "name" ] } }, { "code": "value_length_exceeds_limit", "param": { "**index**": 2, "attributes": [ "email" ] } } ] } } ], "data": {} }
Error codes
In this table, you’ll find the list of errors you may encounter, along with their corresponding HTTP status codes and application status codes.
Error Name | HTTP Status Code | App Status Code | Error Description |
Invalid API token | 401 |
| The API token used is invalid or deleted. |
Invalid subdomain | 400 |
| The subdomain provided is invalid. |
Access denied | 200 | forbidden | Displayed when the API token does not have the required authorization to perform the operation. |
API limit reached | 200 | rate_limit_exceeded | Displayed when the user exceeds the number of API requests they can make in a period of time. |
Subscription trial expired | 200 | subscription_trial_expired | Displayed when the user’s SuperOps.ai trial is expired. |
Subscription paused | 200 | subscription_paused | Displayed when the user’s SuperOps.ai subscription is paused. |
Subscription canceled | 200 | subscription_cancelled | Displayed when the user’s SuperOps.ai subscription is canceled. |
Type validation failed | 200 | type_validation_failed | Displayed when the data type of the attribute is wrong or doesn’t match. |
Mandatory validation failed | 200 | mandatory_validation_failed | Displayed when no values are provided for a mandatory attribute. |
Field length validation failed | 200 | value_length_exceeds_limit | Displayed when the value length provided exceeds the value limit. |
Allowed value validation failed (referential integrity) | 200 | referred_value_does_not_exist | Displayed when the value provided is wrong/does not exist. |
Allowed value validation failed (pattern) | 200 | value_pattern_validation_failed | Displayed when the value provided does not satisfy the required conditions. |
Dependency validation failed | 200 | dependent_validation_failed | Displayed when there is no relationship between dependent attribute values. |
Unique validation failed | 200 | unique_validation_failed | Displayed when trying to create a duplicate record. |
The entity does not exist | 200 | entity_does_not_exist | Displayed when the entity does not exist in the system. |