Errors
When Light refuses a request, you get an HTTP status and usually an ErrorResponse body.
ErrorResponse fields
| Field | Meaning |
|---|---|
code | Error code |
message | Human-readable message |
correlation_id | Request correlation id (string or null) |
retryable | Whether a retry may succeed |
details | Extra context (object or null) |
OpenAPI: a request body the API cannot read is also 422, with a detail list instead of code (HTTPValidationError).
HTTP status codes
From the Light operation responses:
| HTTP | OpenAPI meaning |
|---|---|
| 401 | Unauthorized |
| 402 | No active subscription, or insufficient token balance |
| 408 | Request timed out |
| 422 | No page (NO_RESULTS or UPSTREAM_BLOCKED), or unreadable body. Neither no-page case is billed |
| 429 | Request throttled |
| 500 | Internal server error |
| 502 | Upstream unreachable |
| 503 | Google search is not available on this deployment |
422: NO_RESULTS vs UPSTREAM_BLOCKED
OpenAPI text for 422:
NO_RESULTS: Google returned no results. Not retryable: asking again changes nothing.UPSTREAM_BLOCKED: Google would not serve the query. Retryable: the same query often passes on another exit.- Neither is billed.
Example shape (ErrorResponse):
{
"code": "UPSTREAM_BLOCKED",
"message": "search blocked (captcha) after 3 attempts",
"correlation_id": "0b8e7f42-91c3-4d6a-b5e0-2a7c9d13f846",
"retryable": true,
"details": {
"reason": "captcha",
"attempts": 3
}
}Use retryable to decide whether to try again. Keep correlation_id if you contact support.
Billing reminders
- No returned page on those 422 cases: not billed
- Successful pages: see
pages_returnedin Requests and cost
Next
Was this page helpful?