MCPcopy
hub / github.com/Fission-AI/OpenSpec / isNodeErrorCode

Function isNodeErrorCode

src/core/file-state.ts:66–73  ·  view source on GitHub ↗
(error: unknown, code: string)

Source from the content-addressed store, hash-verified

64const LOCK_POLL_MS = 25;
65
66export function isNodeErrorCode(error: unknown, code: string): boolean {
67 return (
68 typeof error === 'object' &&
69 error !== null &&
70 'code' in error &&
71 (error as NodeJS.ErrnoException).code === code
72 );
73}
74
75export async function pathIsFile(filePath: string): Promise<boolean> {
76 try {

Callers 2

acquireFileLockFunction · 0.85
isFileNotFoundErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected