Error codes
Used both in HTTP error response bodies and in the streaming error event. See Errors and rate limits for the envelope.
| Code | HTTP status | Description |
|---|---|---|
invalid_request | 422 | Request body or query parameters failed validation; carries error.details (HTTP only). |
invalid_payload | n/a | WebSocket frame could not be parsed, or failed field validation (streaming-only). Carries error.details when the failure was field validation. |
invalid_message_type | n/a | Unsupported event type for the current connection phase (WebSocket). |
conversation_not_found | 404 | Conversation id does not exist. Applies to HTTP GET/POST/PATCH and to WebSocket conversation.resume. |
conversation_assistant_message_not_found | 404 | Assistant message id does not exist in this conversation. |
entity_not_found | 404 | A referenced knowledge-base entity — condition, evidence, … — does not exist. |
not_ready_summary | 409 | Summary requested before the conversation reached a recommendation. |
turn_already_active | 409 | A new turn cannot be started because another one is active. HTTP only — the WebSocket transport preempts the active turn instead. Retrying with the same user-message id is idempotent and returns the existing turn. |
conversation_terminated | 409 | The conversation was permanently terminated — for example an underage patient or a confirmed demographics change — and rejects further user messages. |
conversation_completed | 409 | The conversation finished its end-of-conversation flow and rejects further user messages. |
message_too_long | 413 | User message exceeds max_message_length. |
unknown_evidence | 422 | Seeded assessment.evidence on create refers to an id the knowledge base does not know. |
rate_limit_exceeded | 429 | Too many requests from the current client. |
turn_failed | 500 | The current turn failed. |
internal_server_error | 500 | Unhandled server error. |
turn_timeout | 504 | Processing did not finish within the request timeout. |
Authentication codes
| Code | HTTP status | Description |
|---|---|---|
missing_token | 401 | No Authorization header was sent. |
invalid_token | 401 | The bearer token is malformed, or carries no instance_id. |
unmapped_instance | 401 | The resolved instance_id is not a provisioned Conversational Triage instance. |
Generic status-derived codes
Other 4xx and 5xx responses that originate from the HTTP layer rather than from a domain error carry a code derived from the HTTP status phrase — for example unauthorized (401), forbidden (403), not_found (404), gateway_timeout (504). Treat an unrecognized code as a generic failure for its status class.