Skip to Content

Errors

Every error response from the API is an RFC 9457  problem-details document with Content-Type: application/problem+json, and every response — success or error — carries an X-Request-Id header. The one exception is malformed transport: a request rejected before it reaches the API layer (unparseable JSON, a body over the 2 MB cap) gets a plain 400/413 with neither a problem body nor a request id.

The shape

{ "type": "https://api.regsn.app/problems/validation", "title": "Validation error", "status": 422, "detail": "horizon must be one of 3, 6, 12, 18, 24, 36", "instance": "/v1/scans", "code": "validation_error", "request_id": "req_m3k9f2ab8xk2p91q", "errors": [ { "path": "horizon", "code": "invalid", "message": "horizon must be one of 3, 6, 12, 18, 24, 36" } ] }
FieldMeaning
typeStable problem URI: https://api.regsn.app/problems/<slug>.
titleHuman-readable category for the status.
statusThe HTTP status, repeated in the body.
detailWhat went wrong, specifically. Unexpected 5xx never leak internals — their detail is the generic "Internal server error"; deliberate 5xx (for example a 503 when the database is unavailable) keep a specific message.
instanceThe request path that produced the error.
codeMachine-readable error code — branch on this, not on detail strings.
request_idMatches the X-Request-Id header.
errorsPer-field problems on validation failures; empty otherwise. Each entry: { path, code, message }.

Quote the request id. request_id (req_…) correlates your request with server-side traces end-to-end. Include it in any support message — it is the fastest route to an answer.

Error codes

The top-level code, by status:

StatuscodeMeaningWhat to do
400invalid_requestMalformed request. Note unparseable JSON is rejected before the API layer, with a plain body rather than a problem document.Fix the request.
401authentication_requiredNo bearer token.Send Authorization: Bearer regsn_live_….
401authentication_invalidToken malformed or unknown.Check the key value; create one if needed.
401key_revokedKey exists but was revoked.Switch to an active key.
402budget_exhaustedAccount budget pool depleted.Check GET /v1/usage/budget; contact your workspace administrator to raise the cap.
403permission_deniedAuthenticated but not allowed.Verify the resource belongs to your account.
404not_foundResource missing, or owned by another account.Check the id.
404translation_not_availableNo translation for the requested language on /executive-narrative.Request en, or re-scan with translationLanguages.
409conflictGeneric state conflict.Re-read the resource.
409invalid_stateScan already terminal on /cancel.Nothing — it is already finished.
409not_readyExport not completed on /download.Keep polling, then download.
409idempotency_key_in_useSame Idempotency-Key, different body.Use a fresh key for a genuinely new request. See Idempotency.
409idempotency_in_progressOriginal request with this key still running.Wait, then retry with the same key.
410goneExport completed but artefact bytes no longer retained.Re-run the export.
416range_not_satisfiableRange header outside the resource.Fix or drop the Range.
422validation_errorOne or more fields invalid — see errors[].Fix each listed field.
422unknown_parameterA removed or unrecognised query parameter — currently starred on GET /v1/snapshots (snapshot starring is retired).Drop the parameter.
422key_limit_exceededAlready at 10 active API keys.Revoke one first.
422invalid_idempotency_keyIdempotency-Key not 1–255 printable ASCII characters.Fix the header value.
429rate_limit_exceededBucket exhausted.Honour Retry-After. See Rate limits.
500internal_errorUnexpected server error.Retry with backoff; report the request_id if it persists.
503transient_errorTemporarily unavailable (e.g. database).Retry with backoff. Safe with the same Idempotency-Key.
503engine_unavailableRequested scan engine not loaded.Use an engine from GET /v1/meta/engines.

Field-level codes

Inside errors[] on a 422, path names the offending field (e.g. horizon, options.styleSlug) and code is one of:

errors[].codeMeaning
required / missingRequired field absent.
invalidValue outside the allowed shape or vocabulary.
invalid_rangefrom after to on /v1/usage.
incompatibleField valid only in combination with another setting (e.g. fetchProvider without engine: "v4.5-beta").
engine_deprecatedA retired engine id (v1, v2, v3, admiral).
haiku_blocked_on_verifiermodel: "haiku" on a verifier-aware config.
unknownUnknown value (e.g. an unregistered provider:artifact_type pair or export status filter).
unknown_optionExport option name not in the type’s schema — the message includes a did-you-mean hint and the valid list.
invalid_valueExport option value outside the enum — message lists valid values.
invalid_typeExport option value not a string.
too_longString over its maxLength.

Retry guidance

  • Retry on 429 (after Retry-After), 500, and 503, with exponential backoff.
  • Do not retry 4xx other than 429 without changing the request — the outcome will not change.
  • Always pair POST retries with an Idempotency-Key so a retry can never duplicate a scan or export. Failed (non-2xx) attempts are not cached, so the same key retries cleanly.

Both SDKs implement exactly this policy and surface errors as a typed exception carrying status, code, request_id, and the full body.

Last updated on