Update contributing, deduplicate more functions

This commit is contained in:
quotentiroler
2026-02-09 19:21:33 -08:00
parent 453eaed4dc
commit cc87c0ed7c
13 changed files with 96 additions and 100 deletions

View File

@@ -62,10 +62,12 @@ export function isAbortError(err: unknown): boolean {
if (name === "AbortError") {
return true;
}
// Check for abort messages from Node's undici and other sources
const message =
"message" in err && typeof err.message === "string" ? err.message.toLowerCase() : "";
return message.includes("aborted");
// Check for "This operation was aborted" message from Node's undici
const message = "message" in err && typeof err.message === "string" ? err.message : "";
if (message === "This operation was aborted") {
return true;
}
return false;
}
function isFatalError(err: unknown): boolean {