From 3670a918bbb3c4eb091dec3de7b72f17404dfc7b Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 8 May 2026 22:32:54 -0400 Subject: [PATCH] chore: Catch other types of client aborted error (#12303) * chore: Catch other types of client aborted error * Add EPIPE --- server/onerror.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/onerror.ts b/server/onerror.ts index d65e081eac..ed22f776ff 100644 --- a/server/onerror.ts +++ b/server/onerror.ts @@ -26,6 +26,12 @@ export default function onerror(app: Koa) { if (err.internalCode === 1002) { err = ClientClosedRequestError(); } + } else if ( + err.code === "HPE_INVALID_EOF_STATE" || + err.code === "ECONNRESET" || + err.code === "EPIPE" + ) { + err = ClientClosedRequestError(); } // Push only errors explicitly marked for Sentry reporting.