Error codes, common query errors, timeouts, limits, caching and retries for the Jepto API.
The REST and GraphQL APIs use the same error codes and limits.
404 Not Found{
"error": {
"code": "CLIENT_NOT_FOUND",
"message": "Client a1b2c3d4e5f6a7b9 not found. List clients with GET /clients."
}
}200 OK{
"data": { "analyticsQuery": null },
"errors": [
{
"errorType": "CLIENT_NOT_FOUND",
"message": "Client a1b2c3d4e5f6a7b9 not found."
}
]
}200 OK{
"queryId": "qry_a1b2c3d4e5f6a7b8",
"status": "FAILED",
"error": {
"code": "SOURCE_ERROR",
"message": "googleAds: the connection needs to be re-authorised in Jepto."
}
}Branch on code (REST) or errorType (GraphQL). Messages are for people and can change.
| Code | HTTP | Meaning | Retry? |
|---|---|---|---|
UNAUTHENTICATED | 401 | Token missing, malformed, expired, or not an access token | After refreshing the token |
FORBIDDEN | 403 | The user can’t read this data | No |
INVALID_REQUEST | 400 | Malformed or unknown body key, invalid JSON, or "all_clients" where only one client is allowed | No |
INVALID_QUERY | 400 | The query breaks a rule in Queries | No |
CLIENT_NOT_FOUND | 404 | No active client with this ID in your account | No |
QUERY_NOT_FOUND | 404 | Unknown, expired (after one hour) or another user’s queryId | No; run the query again |
RATE_LIMITED | 429 | Too many requests | Yes, after Retry-After |
INTERNAL_ERROR | 500 | An error on Jepto’s side | Yes, with backoff |
QUERY_TIMEOUT | in FAILED | The query ran for 5 minutes without finishing | Narrow it first |
RESULT_TOO_LARGE | in FAILED | The result is over 5 MB | Lower limit or use a coarser granularity |
SOURCE_ERROR | in FAILED | A platform returned an error, for example because the connection needs re-authorising | Yes, after fixing the connection |
| Message | Fix |
|---|---|
| Unknown field <name>… | Copy the field name from the schema, including case |
| Only one timeDimensions entry is supported per query. | Send one time dimension |
| Date dimension '<name>' must not appear in dimensions; use timeDimensions… | Move the date field to timeDimensions and add granularity |
| Invalid granularity '<x>'. Use one of: day, month, quarter, sunday_week, week, year. | Use one of the listed values |
| Time granularity '<g>' is finer than dateGrain '<s>' for measure '<m>'. | Use a coarser granularity for that metric |
| Unsupported filter operator '<op>' on '<member>'… | Use an operator from the Filters table |
| Unsupported measure aggregation '<x>'; use one of: avg, count, count_distinct, max, min, sum | Use one of the listed values |
| Invalid compareDateRange… | Send [[start, end], [start, end]] with ISO dates |
| Custom field '<x>' cannot be used as a dimension… | Put metric custom fields in measures |
| apiPeriod time series requires <n> bucket fetches (limit 36)… | Use a shorter range or a coarser granularity for that metric (see Data Model → Period rollups) |
| Limit | Value |
|---|---|
Wait before 202 / RUNNING | About 25 seconds |
| Maximum query run time | 5 minutes, then QUERY_TIMEOUT |
| Result kept after finishing | 1 hour, then QUERY_NOT_FOUND |
| Limit | Value |
|---|---|
Rows per request (limit) | 1 to 10,000. Default 10,000. |
| Rows per query across all pages | 10,000 (offset + limit) |
| Time dimensions per query | 1 |
| Result size | 5 MB |
| Clients per query | 1. "all_clients" is only accepted when reading the schema. |
| Access token lifetime | 60 minutes |
| Refresh token lifetime | 30 days |
| Request rate | Limited per account. 429 responses include Retry-After. |
renewQuery: true refetches from the platforms and replaces the cached result.cacheStatus and lastRefreshTime in each response tell you whether the result came from the cache and when it was computed.RATE_LIMITED, INTERNAL_ERROR and SOURCE_ERROR with exponential backoff and jitter: about 1, 2, 4 and 8 seconds, then stop.INVALID_REQUEST, INVALID_QUERY, FORBIDDEN or CLIENT_NOT_FOUND; the same request fails the same way.UNAUTHENTICATED, refresh the token once and retry. If it fails again, sign in again.202 and RUNNING aren’t errors. Poll the queryId; don’t start the query again.