Clatter LabsHelp Center

What does stream_error mean?

TroubleshootingUpdated

A streamed response broke before it finished. If it happens mid-stream you get data: {"error": {...}} followed by data: [DONE].

Code: stream_error · HTTP status: 502, 503 or 504

Text you already received is real, but the answer is incomplete.

Common causes#

  • an interruption while the model was streaming

How to fix it#

  1. Treat the reply as incomplete; don't show it as final.
  2. Retry the request (the whole request, not just the rest).
  3. Check for an error object in every chunk, not just the HTTP status, since the status was already 200 when the stream started.

Should my code retry?#

Retryable.

The error body uses the OpenAI shape, so OpenAI SDKs raise it as an exception you can catch:

{"error": {"message": "...", "type": "...", "code": "stream_error", "param": null}}

Every response also carries an X-Request-Id. Keep it in your logs; it's the quickest way for support to find a request.

See the full list in the Model API reference.

Still need help?#

We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.