API error codes and HTTP status mapping
Every EvalGate error code, its HTTP status, what it means, and how to handle errors in TypeScript and Python with try/catch examples.When a request fails, EvalGate always returns a JSON object in the same envelope shape — regardless of the HTTP status code. Parsing this envelope lets you handle every error class in a single place.
Error envelope
Every error response has this structure:string
A machine-readable constant identifying the error class. Use this field for programmatic error handling — never parse
message.string
A human-readable description of what went wrong. Suitable for logs and development debugging; do not display this to end users without filtering.
unknown
Optional additional context, omitted when there is none. For
VALIDATION_ERROR, this describes which fields failed and why; other codes may include structured context such as per-judge failure codes.string
A UUID that uniquely identifies the request on EvalGate’s servers. Include this value in any support ticket — the team can use it to locate the exact request in logs. The same UUID appears in the
x-request-id response header.Error codes and HTTP status mapping
Agent handoff routes also return
AGENT_HANDOFF_INVALID (400), AGENT_HANDOFF_DENIED (403), and AGENT_HANDOFF_EXPIRED / AGENT_HANDOFF_CONSUMED (410).
QUOTA_EXCEEDED, FEATURE_LIMIT_REACHED, and NO_ORG_MEMBERSHIP all map to HTTP 403. Distinguish them by the code field, not the status code.