Errors
A failed HTTP call and a failed chat turn do not use the same channel. The HTTP call returns a flat error body. A turn that was already accepted reports the failure on the assistant message, which you read by polling its status.
Every response also carries x-request-id. Send your own value to reuse it. Quote it when you contact support: the technical cause of a 500 is logged with that id and is not in the body.
HTTP errors​
Any response with a status of 400 or above has this shape:
{
"code": "NOT_FOUND",
"message": "Agent not found."
}
| Field | Meaning |
|---|---|
code | Stable identifier in SCREAMING_. Branch on this, not on the sentence. |
message | Sentence safe to show. |
details | Present on some 4xx when the route attached a structured detail. |
A field the route placed next to the error is kept. A workspace conflict still carries currentVersion beside code and message.
What each status returns​
| Status | code when the route did not set one | Body |
|---|---|---|
| 400 | BAD_ | The sentence the route wrote. A validation failure uses VALIDATION_ and the first issue sentence, or the route's own sentence when it set one. The raw validator dump is logged, not returned. |
| 401 | UNAUTHORIZED | No valid credentials. |
| 403 | FORBIDDEN | Credentials are valid and do not grant access to this resource. |
| 404 | NOT_ | The route's sentence. A missing conversation you do not own is also a 404, with an empty body left as { "code": "NOT_FOUND", "message": "Not found." }. |
| 409 | CONFLICT | The route's sentence, plus any extra field such as currentVersion. |
| 422 | UNPROCESSABLE_ | The route's sentence. |
| 429 | TOO_ | The sentence of the limit that fired. Retry-After and the X-RateLimit-* headers say which quota and when to retry. |
| 500 and above | INTERNAL_ | Always { "code": "INTERNAL_ERROR", "message": "An error occurred." }. The exception text stays in the server log http.error. |
A 4xx whose message is itself a stable code (AGENT_) uses that string as code. Historical routes that set error.name to a stable code (APP_) keep that code.
Chat turn errors​
A streamed or asynchronous turn accepts the call first (202, with a messageId) and fails later. Poll:
GET /conversations/:conversationId/messages/:messageId/status
Until the assistant message exists, the status is pending. While the model runs it is generating or tool_calling. On failure:
{
"status": "error",
"content": "Sorry, an error occurred while processing your request.",
"error": {
"code": "PIPELINE_ERROR",
"message": "Sorry, an error occurred while processing your request.",
"details": { "raw": "provider timeout" }
}
}
Show content. It matches error.message. Branch on error.code. details is for diagnosis; details.raw can contain the provider text.
error.code | When | Sentence |
|---|---|---|
MODEL_ | The model cannot call tools. | Change the model or turn the agent's tools off. |
MODEL_ | The model cannot read images. | Change the model or remove the image. |
CAPABILITY_ | The model was refused before the call, because of vision, tools, or the token window. | message is a JSON string { "code": "CAPABILITY_BLOCKED", "errors": [{ "code", "modelName", "details" }] }. Inner code is VISION_, TOOLS_, or TOKEN_. |
PIPELINE_ | Anything else, including a model call that failed for another reason, and a guardian that is not fully configured. | Sorry, an error occurred while processing your request. An incomplete guardian uses a sentence that asks to finish the guardians, in the conversation language (fr, lu, or English). |
On a synchronous prompt (no stream, conversation not async), a tools, vision, or capability failure is an HTTP 400. Show message. The specific code above is on the message status once the turn is streamed or async; the 400 body uses BAD_ unless the route placed the code in error.name. A generic failure is returned as the reply text and stored with PIPELINE_, so the HTTP call itself succeeds.
The same object is stored on the assistant message and comes back with the conversation.
Moderation​
A message refused by a guardian is not status: "error". The user message and the assistant reply are both status: "moderated". content is the refusal in the conversation language. There is no error object.
Avatars and apps​
When the turn targets an application, the user-facing sentence is also spoken. The app socket receives a SAY with that text, final: true, and the same messageId as the turn. That covers a generic pipeline failure and a moderation refusal. Capability and model-support failures stay on the message status; read error.code there.