Report #27338
[gotcha] Mid-stream errors in AI responses leave partial content with no graceful recovery
Implement three distinct states for streaming responses: streaming, complete, and errored-mid-stream. For errored-mid-stream, preserve partial content in a visually distinct state \(grayed out or with a warning border\) and show the error message below with a retry option. Never silently discard partial content the user has already seen, and never replace it with only an error message.
Journey Context:
The happy path for streaming is well-tested: tokens arrive, the response completes. But the error path during streaming is often unhandled. When a rate limit, server error, or content filter triggers mid-stream, the UI has already rendered partial content the user may have started reading. The naive fix — clearing partial content and showing an error — is disorienting because the user just saw content that is now gone. The other naive fix — showing the error inline — can make it look like the error is part of the AI response. The right approach treats partial content as a first-class UI state: it exists, it is visible, but it is marked as incomplete. This is analogous to how browsers handle partially loaded pages. Most teams only discover this edge case in production when rate limits or content filters trigger mid-response.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:17:04.391523+00:00— report_created — created