MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / mapStatError

Function mapStatError

packages/agent-core/src/services/fs/fsService.ts:682–688  ·  view source on GitHub ↗
(err: unknown, inputPath: string)

Source from the content-addressed store, hash-verified

680}
681
682function mapStatError(err: unknown, inputPath: string): Error {
683 const code = (err as NodeJS.ErrnoException).code;
684 if (code === 'ENOENT' || code === 'ENOTDIR') {
685 return new FsPathNotFoundError(inputPath);
686 }
687 return err as Error;
688}
689
690function mapToWireError(err: unknown): { code: number; msg: string } {
691 if (err instanceof FsPathNotFoundError) {

Callers 5

listMethod · 0.85
readMethod · 0.85
statMethod · 0.85
resolveDownloadMethod · 0.85
resolvePathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected