code and the HTTP status. The message is written for people and can change. details is always an object, usually empty; when it carries data, it’s described below.
Standard error codes
These come from the shared API error type and appear across the AgentHub endpoints.MEMBER_NOT_FOUND is defined in the error type but no endpoint currently returns it.
Errors that surface as INTERNAL_ERROR
Some failures that are really your input still come back as500 INTERNAL_ERROR with the generic message, because the underlying check runs in the database rather than in the API layer. Known cases:
Validation details
VALIDATION_ERROR responses carry details in two shapes.
Trace ingestion returns the full list of problems, grouped by top-level field:
spans without the span index.
Cost Calculator recommendations and evaluation explanations return up to five raw issues with their paths:
message and leave details empty.
OpenTelemetry endpoint errors
POST /traces (OTLP), POST /metrics and POST /logs use the error envelope only for failures that stop the whole request:
Individual spans that can’t be stored don’t fail the request. They’re reported in the OTLP response’s
partialSuccess.rejectedSpans with an errorMessage, and the request still returns 200. See OpenTelemetry (OTLP).
Chat and encryption-key endpoint errors
The ModelHub chat endpoints and the encryption-key endpoint use their own codes, in the shape{ "error": { "code", "message" } } without details.
Errors inside a stream
Once a streaming response has started (200), failures arrive as an event in the stream rather than as an HTTP error:
POST /chat/streamsendsdata: {"type":"error","message":"..."}. One expected case is a message that contains a credential or government identifier: the server sends apiievent and then anerrorevent, and the client must resend withoverridePiiBlock: trueto continue.- The Cost Calculator
.../streamendpoints send{"type":"error","message":"..."}as an NDJSON line.