From 0c855bd36a68e14441b8640faab1e52b2561c36a Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Mon, 26 Jan 2026 19:59:25 -0500 Subject: [PATCH] Infra: fix recoverable error formatting --- src/infra/unhandled-rejections.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/infra/unhandled-rejections.ts b/src/infra/unhandled-rejections.ts index c45923c4b..ac7ac91d5 100644 --- a/src/infra/unhandled-rejections.ts +++ b/src/infra/unhandled-rejections.ts @@ -1,6 +1,6 @@ import process from "node:process"; -import { formatUncaughtError } from "./errors.js"; +import { formatErrorMessage, formatUncaughtError } from "./errors.js"; type UnhandledRejectionHandler = (reason: unknown) => boolean; @@ -25,7 +25,7 @@ function isRecoverableError(reason: unknown): boolean { return true; } - const message = reason instanceof Error ? reason.message : String(reason); + const message = reason instanceof Error ? reason.message : formatErrorMessage(reason); const lowerMessage = message.toLowerCase(); return ( lowerMessage.includes("fetch failed") ||