Skip to main content

Error taxonomy

All error responses from /api/public/v1/* use a single envelope:

{ "ok": false, "error": "<short code>", "detail": "<optional long detail>" }
  • ok is always false on non-2xx responses.
  • error is a short, stable, human-readable code suitable for logging and for switch statements. Treat it as a string, not a strict enum — new values may be introduced over time.
  • detail is optional extra context. When present it repeats error or augments it.

Unhandled 500 responses additionally carry a request_id field. Include it in any support request.

Inspection order

When parsing an error envelope, inspect:

  1. error (the short stable code)
  2. detail (extra context)
  3. message (legacy alias for detail)

Stop at the first non-empty field.

Full catalog

HTTPerrorRecommended client action
400violation_id must be {blueprint_id}:{policy_code}Build the path as {scenario_id}:{policy_code}. Do not retry.
400Malformed tokenThe result_token is invalid. Re-submit via POST /evaluate.
400Organization context requiredKeys admin endpoints only. Ensure the session has a selected organization.
400Key already revokedRefresh the key list; do not retry revoke.
400Key cannot be rotated (inactive or revoked)Create a new key.
400scenario_ids must contain 1 to 100 itemsProvide between 1 and 10 IDs (legacy message; public cap is 10).
401Missing or invalid Authorization headerAttach Authorization: Bearer fb_live_....
401Invalid API key formatKey must start with fb_live_.
401Invalid or expired API keyKey revoked, expired, or unknown. Rotate or recreate.
401API key context missingInternal; should not occur in practice. Retry once; otherwise report.
401Session authentication requiredKeys admin endpoints. Sign in again.
401Invalid, expired, or already-used result tokenDo not retry; fetch results via GET /evaluations/{id} instead.
403Browser access not allowedDo not call from a browser; this API is server-to-server only.
403IP address not allowedCall from an IP in the key's allowlist.
403Missing request signatureAttach the X-FB-Signature header. See Authentication.
403Invalid request signatureVerify HMAC computation. See Sign requests with HMAC.
403org_id does not match API key organizationThe org_id in the body or path must equal the key's org.
403Not authorized for this evaluationEvaluation belongs to another org. Do not retry.
403Key lacks governance:evaluate permissionRecreate the key with governance:evaluate permission.
403Not authorizedKeys admin endpoints. The key belongs to a different org.
404Scenario not foundImport the scenario into the organization first.
404Blueprint not foundSame as above.
404Evaluation not foundUnknown or purged evaluation ID.
404Key not foundRefresh the key list.
413Request body too largeReduce payload size below 10 MB.
429Rate limit exceededHonor Retry-After. See Rate limits and retries.
500Remediation generation failedTransient. Retry with exponential backoff up to 3 times.
500Internal server errorInclude request_id when reporting.
503Public API is disabledFeature flag is off on this environment (emergency kill-switch). Contact support or check the status page.

Decision matrix — retry or fail?

ConditionAction
429Retry. Honor Retry-After.
500 with error: "Remediation generation failed"Retry up to 3 times with exponential backoff.
500 otherSurface to operator with request_id. Do not loop.
503Stop. Check status page. Resume manually.
4xx other than 429Fix the request. Do not retry.
Network errors / TCP resetsRetry up to 3 times with exponential backoff.

Next steps