mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:31:23 +00:00
Deduplicate more
This commit is contained in:
@@ -1,12 +1 @@
|
||||
export function isAbortError(err: unknown): boolean {
|
||||
if (!err || typeof err !== "object") {
|
||||
return false;
|
||||
}
|
||||
const name = "name" in err ? String(err.name) : "";
|
||||
if (name === "AbortError") {
|
||||
return true;
|
||||
}
|
||||
const message =
|
||||
"message" in err && typeof err.message === "string" ? err.message.toLowerCase() : "";
|
||||
return message.includes("aborted");
|
||||
}
|
||||
export { isAbortError } from "../../infra/unhandled-rejections.js";
|
||||
|
||||
Reference in New Issue
Block a user