MCPcopy Index your code
hub / github.com/callstack/agent-device / createSpawnError

Function createSpawnError

src/utils/exec.ts:514–520  ·  view source on GitHub ↗
(executable: string, cmd: string, args: string[], err: Error)

Source from the content-addressed store, hash-verified

512}
513
514function createSpawnError(executable: string, cmd: string, args: string[], err: Error): AppError {
515 const code = (err as NodeJS.ErrnoException).code;
516 if (code === 'ENOENT') {
517 return createMissingToolError(executable, cmd, err);
518 }
519 return createCommandFailedError(executable, cmd, args, err);
520}
521
522function createMissingToolError(executable: string, cmd: string, cause: Error): AppError {
523 return new AppError('TOOL_MISSING', `${executable} not found in PATH`, { cmd }, cause);

Callers 1

spawnRejectionErrorFunction · 0.85

Calls 2

createMissingToolErrorFunction · 0.85
createCommandFailedErrorFunction · 0.85

Tested by

no test coverage detected