Skip to content

v13.4.0

@WendellAdriel WendellAdriel tagged this 20 Mar 20:17
* Handle exceptions in eventStream to prevent fatal error

When an exception is thrown mid-stream in an eventStream response,
headers have already been sent. The global exception handler then
tries to send a new error response, which triggers a fatal
"Cannot modify header information" error.

Catch exceptions during streaming, report them through the normal
exception handler, and emit an SSE error event so the client can
detect and handle the failure gracefully.

Fixes #59291

* Do not leak exception messages to eventStream clients

Exceptions thrown mid-stream are now silently caught and reported
server-side only. The error message is no longer emitted as an
SSE event, preventing internal details from being exposed to clients.
Assets 2
Loading