Errors & Status Codes

AVAILABLE

Naagmani returns clear, structured JSON errors with standard HTTP status codes and machine-readable error codes.


Standard Error Schema #

json
{
  "code": "invalid_request",
  "message": "Detailed human-readable explanation of why the request failed.",
  "request_id": "req_01J8F0A2B3C4D5E6F7G8H9J0K1"
}

HTTP Status Codes & Error Codes #

HTTP StatusError CodeDescription & Mitigation
400invalid_requestMalformed JSON payload or hierarchy budget constraint violation.
401invalid_api_keyProvided API Key or Service Token is invalid, revoked, or expired.
403permission_deniedToken lacks the required capability in its capability matrix.
404not_foundThe requested project, member, or model resource does not exist.
429quota_exceededTenant or member has exceeded their configured monthly/daily spending cap.
502upstream_failureAll primary and fallback providers in the routing policy failed.
504upstream_timeoutUpstream model adapter timed out waiting for provider response.