Description
The resolveAndValidatePath function throws incorrect error messages based on the error type.
Currently:
ENOENT (path not found) incorrectly throws "Failed to access"
- Other errors like
EACCES (permission denied) incorrectly throw "Path does not exist"
This leads to misleading feedback for users and makes debugging harder.
Location
- File:
packages/core/src/tools/grep.ts
- File:
packages/core/src/tools/ripGrep.ts
Description
The
resolveAndValidatePathfunction throws incorrect error messages based on the error type.Currently:
ENOENT(path not found) incorrectly throws "Failed to access"EACCES(permission denied) incorrectly throw "Path does not exist"This leads to misleading feedback for users and makes debugging harder.
Location
packages/core/src/tools/grep.tspackages/core/src/tools/ripGrep.ts