ErrorResponse envelope:
RequestFailureResponse: status_code, a safe message,
and detail containing code and retryable. Optional reason and
retry_after_seconds explain bounded capacity backoff. Codes include
CAPACITY_UNAVAILABLE, DEPENDENCY_UNAVAILABLE, SERVICE_UNAVAILABLE,
INVALID_UPSTREAM_RESPONSE, EXECUTION_DEADLINE_EXCEEDED,
EXECUTION_WORK_LIMIT_EXCEEDED, and INTERNAL_SERVER_ERROR. Respect the returned
retryability and delay; do not display raw internal diagnostics.
Gateway errors
An unsupported API version or unmatched public URL returns HTTP404 with
{"error_msg":"404 Route Not Found"}. No alternative version is selected.
Authentication failures use the gateway’s { "error": "invalid_api_key" } or
{ "error": "access_denied" } shape. Quota failures return HTTP 429 with
detail.code=RATE_LIMIT_EXCEEDED and a Retry-After header. These gateway
responses are separate from application validation/execution envelopes.
Status Codes
Common Validation Failures
Successful Responses with Warnings
Partial retrieval and token-budget truncation are successful HTTP200 responses. Inspect summary.warnings, coverage, and evidence_budget to decide whether to answer, retry with a larger budget, or report an evidence gap.
When no evidence is found, the query still returns a successful response.
summary.warnings includes LOW_EVIDENCE, and retrieval-derived sections such as metadata_distribution are empty when requested.
An undersized token budget is different from an empty retrieval. If evidence was found but no complete chain fits, the API omits evidence, reports requirements as omitted_by_budget, and includes EVIDENCE_BUDGET_TRUNCATED. It does not return "No data found" or add LOW_EVIDENCE.