From b47a5125870c7bd764756f38e4493e0e5b894b55 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Mon, 1 Sep 2025 14:26:21 +0000 Subject: [PATCH] fix: catch all timeouts --- src/error/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/error/index.ts b/src/error/index.ts index 31f374d..17a3b0d 100644 --- a/src/error/index.ts +++ b/src/error/index.ts @@ -42,7 +42,10 @@ export const logErrorAndReturnNiceString = (ctx: Context, logger: winston.Logger return '🚦 Too many recent timeouts. Please try again later.'; } - if (error instanceof TimeoutError) { + if ( + error instanceof TimeoutError + || (error instanceof DOMException && error.name === 'TimeoutError') // sometimes this gets through, no idea why.. + ) { logger.warn(`${source}: Request timed out.`, ctx); return '🐢 Request timed out.';