UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

14 lines (13 loc) • 607 B
import { hasNodeErrorCode as hasErrnoCode, isNodeError as isErrno } from "@openclaw/fs-safe/path"; //#region src/infra/errno.ts /** Classifies missing filesystem paths across Node and fs-safe boundaries. */ function isMissingPathError(e) { return hasErrnoCode(e, "ENOENT") || hasErrnoCode(e, "ENOTDIR") || hasErrnoCode(e, "not-found"); } /** Ignore only ENOENT; all other failures retain their original identity. */ function ignoreMissingPath(e) { if (hasErrnoCode(e, "ENOENT")) return; throw e; } //#endregion export { isMissingPathError as i, ignoreMissingPath as n, isErrno as r, hasErrnoCode as t };