Error responses consist of a HTTP status code and a JSON error object in the response.
If HTTP status code is not specified in this page, it defaults to 500 Internal Server Error. Requests that do not end with an error, respond with 2xx HTTP status codes.
Types of errors
Authentication errors
Status | Error | Description |
|---|---|---|
|
| Provided oAuth access token is either missing, invalid or expired |
|
| Provided API key was invalid. |
|
| No API key was provided for the request. See authentication for detailed instructions. |
Access errors
Status | Error | Description |
|---|---|---|
|
| Access was denied due to IP restrictions in your API key. |
|
| Access was denied because your API key does not has sufficient permissions to access the resource. |
|
| Provided API key was valid but is no longer enabled. |
|
| Requested data source is not included in your license. |
|
| Request contains more accounts than your license allows. See usage limits. |
|
| Your license has exceed that maximum amount of queries per day allowed for the data source. See usage limits. |
|
| Your license has expired. |
|
| Request is asking for more historical days than your license permits. Historical days are the number of days between the oldest date in the request, and the current date, inclusive of future end dates. |
|
| No license was found. Please contact support. |
|
| Your license queries have been suspended. Please contact support. |
|
| Request asks for more result rows with max_rows than your license permits. See usage limits. |
Request errors
Status | Error | Description |
|---|---|---|
|
| Provided account filter uses invalid data structure. |
|
| Filter pattern is not a PCRE compatible regular expression. |
|
| Provided value does not look like a valid account ID. |
|
| Request requires one or more data source accounts. |
|
| Accounts are provided with invalid data structure. |
|
| Provided comparison range end is not a valid date value. |
|
| Request requires comparison range end date. |
|
| Requested comparison dates are reversed. |
|
| Requested display type for comparison values is invalid. |
|
| Provided comparison range start is not a valid date value. |
|
| Request requires comparison range start date. |
|
| Requested date range comparison type is invalid. |
|
| Requested data source ID is invalid. |
|
| Requested date range dates are reversed. |
|
| Requested date range type is invalid. |
|
| Data source users are provided with invalid data structure. |
|
| Provided date range end is not a valid date value. |
|
| Request requires date range end date. |
|
| Requested field can't be used with the query. See description for details. |
|
| Provided custom field name is invalid. |
|
| Requested field can't be found. |
|
| Requested field has invalid split type. See fields. |
|
| Requested fields can't be used together. |
|
| Requested field parameter structure is invalid. |
|
| Request requires at least one field. |
|
| Request requires more metric fields than were provided. |
|
| Filter string can't be understood due to invalid syntax. |
|
| Requested column order type is invalid. |
|
| Order sort direction is invalid. |
|
| Request parameter json was provided, but it was not a valid JSON string. |
|
| Provided segments but segments are not supported in the data source. |
|
| Provided settings use invalid data structure. |
|
| Provided setting key is invalid. |
|
| Provided setting value is not one of the supported values. |
|
| Provided setting has a value with an invalid data type. |
|
| Requested date range starts in the future. |
|
| Requested date range starts before the earliest supported start date for the data source. |
|
| Provided date range start is not a valid date value. |
|
| Request requires date range start date. |
|
| Requested amount of seconds to wait for results that exceeded the maximum allowed value. |
Data source errors
Status | Error | Description |
|---|---|---|
|
| Account filter did not match to any accounts. |
|
| Requested data source account is invalid, due to reason in the description. See exclude_invalid_accounts setting. |
|
| Requested data source account can't be found. See exclude_unavailable_accounts setting. |
|
| Data source API is rate limiting requests. Please allow some time to pass before retrying your request. |
- |
| Data source access token has expired and can't be automatically refreshed. |
- |
| Login to data source failed. Please contact support. |
- |
| Data source authentication credentials are no longer valid. |
- |
| No suitable data source authentications found for request. |
- |
| Requested data source authentication can't be found. |
- |
| Requested data source segment can't be found. |
Conversion errors
Status | Error | Description |
|---|---|---|
- |
| Using the decode_json_fields setting was unsuccessful. |
- |
| The given URL lacks some query parameters. |
- |
| The provided URL does not appear to be a fully qualified URL. |
- |
| The supplied URL has credentials that are not associated with active authentication. |
Queue errors
Status | Error | Description |
|---|---|---|
- |
| Status for requested query could not be found. Either request is invalid, the query has not been registered yet, or the query status is no longer available. |
|
| You have exceeded the maximum amount of requests that can wait for the same query results. See usage limits. |
System errors
Status | Error | Description |
|---|---|---|
– |
| Internal error while resolving already running query. Contact Supermetrics for support on this error. |
– |
| Unknown error during query run. See description for details. |
- |
| All other errors. |
Error response
Detailed error information will be contained in one error object. Response can provide either an error or data, but never both.
Error example
Following is an example of a full error response.
HTTP 401 Unauthorized
{
"meta": {
"request_id": "tDcBg85cRzVZru7mRVQNkQ35tE4DdsPu"
},
"error": {
"code": "API_KEY_INVALID",
"message": "Invalid API key",
"description": "Provided API key was invalid."
},
"links": {
"docs": {
"href": "https://supermetrics.com/docs/product-api-error-codes#api_key_invalid"
}
}
}Error object properties
Property | Type | Description |
|---|---|---|
|
| Error code for the error |
|
| Short localized error message or code if not available |
|
| Detailed localized error description |
|
| Additional links for error, if available |
|
| URL to relevant technical documentation |
|
| URL to relevant help to understand and/or resolve the error situation |
Best practices
Only reference the code property or HTTP status code to identify error situations in your application. Other properties can change at any time, or contain mixed dynamic information that cannot be guaranteed to be of consistent quality