path-to-regexp
path-to-regexp copied to clipboard
Improve error messages by including the path
Without the path users need to search all their code for a malformed path or debug to find the issue
Closes: #336
Tried a couple of different places to include the path in the error message and I think prepending it is the easiest to read but if you'd like it somewhere else I'd update accordingly
I've just merged https://github.com/pillarjs/path-to-regexp/pull/363 which adds the original path to the error.