fix(rdesign): catch SSE stream close errors (Cloudflare QUIC reset)

Add .catch() to the ReadableStream reader loop so Cloudflare QUIC
protocol resets on stream close don't surface as uncaught errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-24 12:13:44 -07:00
parent 4ed940d75c
commit 50c003e8e3
1 changed files with 4 additions and 0 deletions

View File

@ -295,6 +295,10 @@ const RDESIGN_JS = `
} }
} }
read(); read();
}).catch(function(e) {
// Stream closed (Cloudflare QUIC reset or normal close)
if (uiState !== 'error' && uiState !== 'done') setState('done');
abortController = null;
}); });
} }
read(); read();