(err: unknown, inputPath: string)
| 680 | } |
| 681 | |
| 682 | function 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 | |
| 690 | function mapToWireError(err: unknown): { code: number; msg: string } { |
| 691 | if (err instanceof FsPathNotFoundError) { |
no outgoing calls
no test coverage detected