Errors & status codes

How Scout reports failures, and which responses are safe to retry.
View as Markdown

Status codes

CodeMeaningWhen it happens
200OKThe request succeeded.
202AcceptedAn async task run was created and is queued.
404Not foundNo resource matched - e.g. an unknown run_id.
422Unprocessable entityThe request body failed validation; detail lists the field errors.
502Bad gatewayAn upstream fetch or extraction failed.
503Service unavailableCapacity is saturated, retrieval was blocked, or the research core is not configured. Transient.

Error body

Errors return a JSON object with a detail field. For a single failure detail is a string; for a 422 validation error it is a list of the offending fields.

1{
2 "detail": "search blocked: upstream returned a challenge page"
3}

Response headers

Successful responses carry timing and cache diagnostics.

HeaderDescription
X-CacheHIT if the response was served from cache, else MISS.
X-Elapsed-MsServer-side processing time in milliseconds.
X-Batch-SizeNumber of items processed, on batch endpoints.

Retrying

A 503 is transient - capacity or a momentary block - and is safe to retry with exponential backoff. A 502 may be retried once. A 422 is a problem with the request itself and will fail again unchanged.