﻿# SCAN_BUDGET_EXHAUSTED — residual scan exceeded the backends row budget

Some conditions are not indexable — for example a regex or a wildcard path match — so the backend must scan candidate rows and post-filter them in the eng…

<em>cyoda-go version <a href="https://github.com/Cyoda/cyoda-go/releases/tag/v0.8.3">0.8.3</a></em>

# errors.SCAN_BUDGET_EXHAUSTED

## NAME

SCAN_BUDGET_EXHAUSTED — a search or grouped-stats condition could not be pushed down to storage, and evaluating it as a residual filter examined more rows than the backend's configured scan budget.

## SYNOPSIS

HTTP: `400` `Bad Request`. Retryable: `no`.

## DESCRIPTION

Some conditions are not indexable — for example a regex or a wildcard path match — so the backend must scan candidate rows and post-filter them in the engine instead of pushing the predicate to storage. When the number of rows scanned this way exceeds the configured scan-budget limit, the request fails fast instead of running unbounded.

Not retryable with the same parameters. Narrow the query with an indexable predicate (equality or range on a stored field), add a further selective condition to shrink the candidate set, or raise the backend's scan-budget configuration if the broad scan is intentional.

## SEE ALSO

- errors
- errors.SEARCH_RESULT_LIMIT
- errors.CONDITION_TYPE_MISMATCH

## See also

- [`cyoda help errors`](/help/errors/) — Every error response from the Cyoda REST API carries a structured `errorCode` in the `properties` object. Multiple codes may share the same HTTP status. Programmatic handling keys on `errorCode`, not HTTP status.
- [`cyoda help errors SEARCH_RESULT_LIMIT`](/help/errors/search_result_limit/) — Direct (synchronous) search is bounded-or-fail: `limit` caps the matched result set rather than paging it. When more entities match than the limit allows, the request is rejected — it never returns a truncated prefix, because a partial result would be indistinguishable from a complete one.
- [`cyoda help errors CONDITION_TYPE_MISMATCH`](/help/errors/condition_type_mismatch/) — Validation is parse-based: a comparison or range operand is rejected only when it parses into none of the field's declared DataTypes. For example `"abc"` against a DOUBLE field is rejected — it is not a number. A numeric-looking string against a polymorphic `[INTEGER, STRING]` field is accepted (it parses as STRING).

## Raw formats

- [`/help/errors/scan_budget_exhausted.json`](/help/errors/scan_budget_exhausted.json) — full descriptor (matches `GET /help/{topic}` envelope)
- [`/help/errors/scan_budget_exhausted.md`](/help/errors/scan_budget_exhausted.md) — body only