MCPcopy
hub / github.com/claude-code-best/claude-code / getErrnoCode

Function getErrnoCode

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

Source from the content-addressed store, hash-verified

126 * Replaces the `(e as NodeJS.ErrnoException).code` cast pattern.
127 */
128export function getErrnoCode(e: unknown): string | undefined {
129 if (e && typeof e === 'object' && 'code' in e && typeof e.code === 'string') {
130 return e.code
131 }
132 return undefined
133}
134
135/**
136 * True if the error is ENOENT (file or directory does not exist).

Callers 15

errors.test.tsFile · 0.90
callFunction · 0.85
validateAttachmentPathsFunction · 0.85
makeLogEntryReaderFunction · 0.85
runFunction · 0.85
saveAgentToFileFunction · 0.85
deleteAgentFromFileFunction · 0.85
copyFileHistoryForResumeFunction · 0.85
persistToolResultFunction · 0.85
clearCwdEnvFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected