Skip to content
VerifAIer
Home / Docs / API / Mistakes & troubleshooting
API · Operate

Common mistakes & troubleshooting

What trips integrators up, and how to fix it, mapped to the real behavior of the endpoints.

Common mistakes

MistakeWhy it's wrongDo instead
Calling /api/vai/* or /api/control/* without credentialsthese are authenticated tiers → 401 Authentication requiredsend X-Session-Token (vai) or X-API-Key (control); the /api/v1/* tier needs none
Posting the audit response's envelope block to an assess endpointthe audit response returns envelope identifiers, not the full envelopeassess with the full EvidenceEnvelope.to_dict() (the sample-evidence.json shape) under {"evidence": …}
Forgetting to wrap evidence in {"evidence": …}the request model expects an evidence fieldsend {"evidence": {…}}; compliance also needs pack_id
Sending an unknown pack_idconstrained by a Literal422use eu_ai_act, nist_ai_rmf, or iso_42001
Expecting a provider API key to be sent by the clientkeys are server-side only; clients never send themset the key in the server env; enable the provider (local-first)
Expecting /api/v1/registry/agents to paginateit returns the full set with a countpaginate at your data layer; use /api/vai/* listings for limit/offset
Assuming role-based access on the session tierthe session guard accepts any valid session (no RBAC yet)enforce authorization at your gateway if required (authorization)
Treating a mock result as an errormock is the deterministic default when no live provider is enabledcheck mode/provider; enable a live provider for real calls
Retrying /api/auth/login in a tight loopper-IP rate limit → 429back off; default is 20 attempts / 15 min

Troubleshooting

SymptomLikely causeFix
401 Authentication requiredno credential on an authenticated tieradd X-Session-Token or X-API-Key; confirm the path tier
401 Invalid or expired sessionsession TTL passed (8h default) or secret rotatedre-login via /api/auth/login
403 API key has been revokedvalid key, but deactivatedissue a new key (cc_bootstrap_owner.py)
422 with a detail arrayrequest-body validation failedread loc/msg; fix the field (missing input, bad pack_id, …)
404 on an agent idagent not observed, or registry lost on restartthe registry is in-memory, re-observe after a restart
trust_level/risk_level is unknownevidence lacked the structural sectionsassess with a full envelope from a real audit
Sessions vanish after restartSESSION_SECRET is ephemeralset a fixed SESSION_SECRET (required in production)
App refuses to startAUTH_COOKIE_SECURE=true with an ephemeral secret (V-F3 gate)set SESSION_SECRET before enabling secure cookies
CORS error in the browserCORS_ORIGINS too restrictiveadd your origin to CORS_ORIGINS (JSON array)
Registry empty in the dashboardnothing observed yet, or wrong API baseobserve an agent; check the dashboard's API base URL
503 from the Stripe webhookwebhook secret unconfiguredset the Stripe webhook secret, or ignore if billing is unused
Still stuck? Confirm the tier (auth tiers), verify the exact request/response shape (conventions), and cross-check the endpoint (open / authenticated). For internals, see the engineering docs.