Skip to main content

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."
}
FieldMeaning
codeStable identifier in SCREAMING_SNAKE. Branch on this, not on the sentence.
messageSentence safe to show.
detailsPresent 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​

Statuscode when the route did not set oneBody
400BAD_REQUESTThe sentence the route wrote. A validation failure uses VALIDATION_ERROR and the first issue sentence, or the route's own sentence when it set one. The raw validator dump is logged, not returned.
401UNAUTHORIZEDNo valid credentials.
403FORBIDDENCredentials are valid and do not grant access to this resource.
404NOT_FOUNDThe 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." }.
409CONFLICTThe route's sentence, plus any extra field such as currentVersion.
422UNPROCESSABLE_ENTITYThe route's sentence.
429TOO_MANY_REQUESTSThe sentence of the limit that fired. Retry-After and the X-RateLimit-* headers say which quota and when to retry.
500 and aboveINTERNAL_ERRORAlways { "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_NOT_FOUND) uses that string as code. Historical routes that set error.name to a stable code (APP_NOT_FOUND) 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.codeWhenSentence
MODEL_TOOLS_NOT_SUPPORTEDThe model cannot call tools.Change the model or turn the agent's tools off.
MODEL_VISION_NOT_SUPPORTEDThe model cannot read images.Change the model or remove the image.
CAPABILITY_BLOCKEDThe 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_NOT_SUPPORTED, TOOLS_NOT_SUPPORTED, or TOKEN_LIMIT_EXCEEDED.
PIPELINE_ERRORAnything 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_REQUEST unless the route placed the code in error.name. A generic failure is returned as the reply text and stored with PIPELINE_ERROR, 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.