Dike

Common errors

What to check for each error code before assuming it's a bug.

Start with the code field in the problem+json body — see the full errors reference for every value. This page is the "what do I actually do about it" version of that list.

401 unauthorized

  • Confirm the header is Authorization: Bearer dike_live_xxxxxxxx — not X-API-Key, not a raw key with no Bearer prefix.
  • Check you're not sending your dashboard session token (JWT from /account/login) to a /v1/* route, or an API key to an /account/* route — see Authentication. They're not interchangeable and both fail with 401.
  • Confirm the key hasn't been revoked from the dashboard — a revoked key fails immediately, not on next rotation.

403 plan_required

Only shows up on POST /v1/reason. It means the account is on the Free plan — /v1/reason requires Pay As You Go. /v1/search, /v1/cite, and /v1/graph/traverse all work on Free.

404 citation_not_found vs 422 citation_unparseable

These look similar but mean different things on /v1/cite:

  • citation_not_found (404): the string parsed fine, Dike understood exactly what law/ruling you meant — it's just not in the corpus. Check /coverage before assuming it's a bug; some jurisdictions/years have real gaps.
  • citation_unparseable (422): Dike couldn't match the string to any supported citation pattern at all. Check detail in the response for the normalized form it attempted — a common cause is a citation shape outside the supported set (see Cite reference for the list).

422 validation_error

Almost always a request-shape issue, not a data issue: missing a required field (query, question, citation, canonical_id), or a value outside the documented range (top_k over 50, depth over 3). Check the field constraints on the relevant API reference page.

429 rate_limited

See Rate limiting for how to diagnose which limit you hit and how to back off correctly.

503 upstream_unavailable

A downstream dependency (Mongo, Qdrant, the embedding service, or the LLM) is unreachable — this is Dike-side, not something in your request to fix. Retry with backoff; if it persists for more than a few minutes, it's worth reporting rather than continuing to retry.