Infra: fix recoverable error formatting
This commit is contained in:
parent
b861a0bd73
commit
0c855bd36a
@ -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") ||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user