MCPcopy Create free account
hub / github.com/Noumena-Network/code / getErrnoPath

Function getErrnoPath

src/utils/errors.ts:148–153  ·  view source on GitHub ↗
(e: unknown)

Source from the content-addressed store, hash-verified

146 * Replaces the `(e as NodeJS.ErrnoException).path` cast pattern.
147 */
148export function getErrnoPath(e: unknown): string | undefined {
149 if (e && typeof e === 'object' && 'path' in e && typeof e.path === 'string') {
150 return e.path
151 }
152 return undefined
153}
154
155/**
156 * Extract error message + top N stack frames from an unknown error.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected