Skip to content

Commit f4a208b

Browse files
martinfrancoispaulmelnikow
authored andcommitted
feat: improve error output by showing which URL caused the error (#1735) (#1740)
After getting an error in the interceptor, mentioning URL's need to start with a slash, it was difficult to find out which URL was causing the issue. With this change, since the URL is included in the error message, it's easier to troubleshoot the issue.
1 parent b71bfd0 commit f4a208b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/interceptor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = class Interceptor {
3434
// we only need to check strings.
3535
if (uriIsStr && /^[^/*]/.test(uri)) {
3636
throw Error(
37-
"Non-wildcard URL path strings must begin with a slash (otherwise they won't match anything)"
37+
`Non-wildcard URL path strings must begin with a slash (otherwise they won't match anything) (got: ${uri})`
3838
)
3939
}
4040

0 commit comments

Comments
 (0)