Errors
Every error has the same body, with an HTTP status to match:
{
"error": {
"code": "insufficient_scope",
"message": "This credential lacks the data:query scope.",
"request_id": "req_a7439ced058a41e98c7edd47c5ed772d",
"details": { "required_scope": "data:query" }
}
}codeis stable: branch on it, not onmessage.messageis for people and may change.request_idmatches theX-Request-Idheader. Quote it when you contact support.detailsholds extra facts for some codes, such asretry_after_secondsorrequired_scope, and is otherwise empty.
Codes
| Status | Code | What to do |
|---|---|---|
| 400 | invalid_request | Fix the request: details names the field. Retrying unchanged fails again. |
| 401 | invalid_credentials | Check the key. It may be mistyped, revoked or expired. |
| 402 | billing_inactive | The organization's subscription needs attention in the TeroAI app. |
| 403 | access_expired | Your access to TeroAI has ended. Renew it in the TeroAI app. |
| 403 | api_access_disabled | The organization's API access is off. Write to [email protected]. |
| 403 | feature_disabled | The feature is not enabled for the organization, or its product does not offer it: Site Selection (SSIS) answers have no maps. details.feature names it. |
| 403 | insufficient_scope | Use a key with the scope in details.required_scope. |
| 403 | product_not_entitled | The dataset belongs to a product the organization does not have. GET /v1/schemas lists the ones it has. |
| 404 | not_found | The ID is wrong, or the item belongs to another user or organization. |
| 409 | conversation_limit_reached | The conversation has 10 questions. Branch it or start a new one: see the conversation limit guide. |
| 409 | schema_mismatch | A follow-up always uses its conversation's dataset. Drop schema, or start a new conversation. |
| 413 | payload_too_large | The request body is over 1 MB. |
| 422 | map_unavailable | The answer's rows cannot be drawn on a map. |
| 429 | rate_limited | Wait details.retry_after_seconds, or the Retry-After header, then retry. |
| 429 | token_limit_exceeded | The monthly token quota is used up. It resets at details.resets_at; reading still works. |
| 500 | internal_error | Retry. If it persists, write to support with the request_id. |
| 503 | upstream_timeout | No answer in time. Stream the answer or ask a narrower question; message may say what to narrow. Retry after Retry-After. |
| 503 | upstream_unavailable | The analysis service failed. Retry after a short wait. |
Retrying
Retry only rate_limited, upstream_unavailable, upstream_timeout and internal_error, with
a growing delay. Other codes fail again until the request or the account changes.
A streamed answer reports a failure as a final error event carrying the same body; see
Long-running requests.
Last updated on