Skip to content

Commit

Permalink
Improved error message for non-existent path.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Oct 20, 2024
1 parent 7c61327 commit cc833ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ func stripPaths(path string) ([]interface{}, error) {
for {
info, err := os.Lstat(path) // Lstat() is deliberate as we need to distinguish symlinks, see below.
if errors.Is(err, os.ErrNotExist) {
return nil, newHttpError(http.StatusNotFound, errors.New("path at does not exist"))
return nil, newHttpError(http.StatusNotFound, fmt.Errorf("path at %q does not exist", path))
} else if err != nil {
return nil, fmt.Errorf("inaccessible path at %q; %v", path, err)
}
Expand Down

0 comments on commit cc833ca

Please sign in to comment.