Errors
Error format
Errors use standard HTTP status codes and a consistent body:
{
"error": {
"code": "invalid_teryt",
"message": "region must be a 2, 4 or 7 digit TERYT code.",
"request_id": "req_01J9ZM4D1Q6W"
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_point, invalid_teryt, invalid_bbox, invalid_limit, unknown_scenario | The request is malformed. The message says which field. |
| 401 | invalid_api_key | Missing, revoked or malformed key. |
| 403 | insufficient_scope | The key lacks the scope for this endpoint. |
| 404 | parcel_not_found, layer_not_found | No such object. |
| 422 | ambiguous_region, uninterpretable_query | Natural-language search could not resolve the request. candidates lists options. |
| 429 | rate_limited | Too many requests. Retry after the Retry-After header. |
| 503 | search_timeout, upstream_unavailable | A search was too broad to finish, or an upstream service (e.g. the national geocoder) is down. Safe to retry. |
A search_timeout is returned with a hint instead of a gateway error:
{
"error": {
"code": "search_timeout",
"message": "Criteria too strict to finish nationally. Narrow the region or relax min area."
}
}Retrying
- Retry
429after theRetry-Afterheader. - Retry
503with exponential backoff (1 s, 2 s, 4 s, max 3 attempts). - Never retry
4xxother than429without changing the request.
The official SDKs do all of this for you.