Version: deno 2.7.11
Originally, I wanted to run a Nuxt App on Deno and utilize both Deno KV and server-sent events to realize some real-time update capabilities. When implementing this functionality, I noticed that my webserver would crash, anytime a client closes the stream.
I tried to narrow the error down and found, that somehow the cancellation of H3 events, while using streams is not properly handled and results in an unhandled exception, that crashes the H3 server.
When executing the same code on node (in my case node v25.7.0), no exception is thrown on client disconnects.
Here is a full reproduction repo: reproduction scenario
I did not manage to find deeper details on what causes this, but here is the error stack trace I get:
Error in event stream: Interrupted: HTTP response was not sent successfully
at InnerRequest.close (ext:deno_http/00_serve.ts:89:32)
at ext:deno_http/00_serve.ts:363:19
Version: deno 2.7.11
Originally, I wanted to run a Nuxt App on Deno and utilize both Deno KV and server-sent events to realize some real-time update capabilities. When implementing this functionality, I noticed that my webserver would crash, anytime a client closes the stream.
I tried to narrow the error down and found, that somehow the cancellation of H3 events, while using streams is not properly handled and results in an unhandled exception, that crashes the H3 server.
When executing the same code on node (in my case node v25.7.0), no exception is thrown on client disconnects.
Here is a full reproduction repo: reproduction scenario
I did not manage to find deeper details on what causes this, but here is the error stack trace I get: