With Server-sent endpoints it is often the case that connection is closed before Deno flushes body stream. When that happens, following error is thrown:
Uncaught Http: connection closed before message completed
await requestEvent.respondWith(response);
^
at Object.respondWith (ext:deno_http/01_http.js:336:25)
at eventLoopTick (ext:core/01_core.js:188:13)
at async Server.#respond (https://deno.land/std@0.185.0/http/server.ts:311:7)
I tried to try/catch handler and listen to router 'error' handler but it looks like the error is thrown outside the context of the router.
Is it somehow possible to catch this error and conditionally silence it?
With Server-sent endpoints it is often the case that connection is closed before Deno flushes body stream. When that happens, following error is thrown:
I tried to try/catch handler and listen to router 'error' handler but it looks like the error is thrown outside the context of the router.
Is it somehow possible to catch this error and conditionally silence it?