You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My app uses unidici 8.7.0 to download files from CloudFlare R2:
constfast_dispatcher=newAgent().compose(interceptors.redirect({maxRedirections: 5}));functionget_download_stream_fast(url){returnrequest(url,{dispatcher: fast_dispatcher,signal: AbortSignal.timeout(30000)}).then(function({statusCode, body}){if(statusCode>=200&&statusCode<300){returnbody;}body.dump();//free the connection, we don't use the bodythrownewError(`HTTP ${statusCode} for: ${url}`);});}
My app also monitors for uncaughtException errors:
I am regularly seeing these in my logs (which seems to correlate with downloads hitting the 30s timeout above).
[UNCAUGHT EXCEPTION] SocketError: other side closed
at TLSSocket.onHttp2SocketEnd (/frontend/node_modules/undici/lib/dispatcher/client-h2.js:661:22)
at TLSSocket.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1698:12)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21)
Perhaps the CDN is not always 100% reliable. Is there a way to catch these exceptions, or should I just ignore them?
UNCAUGHT EXCEPTION] SocketError: other side closed
at TLSSocket.onHttp2SocketEnd (/frontend/node_modules/undici/lib/dispatcher/client-h2.js:645:22)
at TLSSocket.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1698:12)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21)
Activity
http2: don't throw when destroying socket proxy
http2: don't throw when destroying socket proxy
http2: don't throw when destroying socket proxy
http2: don't throw when destroying socket proxy
http2: don't throw when destroying socket proxy
jeroen commentedon Jul 27, 2026
After updating to 8.8.0 now seeing these errors:
http2: don't throw when destroying socket proxy
http2: don't throw when destroying socket proxy