Skip to content

Commit

Permalink
feat: improve error output by showing which URL caused the error (#1735
Browse files Browse the repository at this point in the history
…) (#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.
  • Loading branch information
martinfrancois authored and paulmelnikow committed Oct 7, 2019
1 parent b71bfd0 commit f4a208b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/interceptor.js
Expand Up @@ -34,7 +34,7 @@ module.exports = class Interceptor {
// we only need to check strings.
if (uriIsStr && /^[^/*]/.test(uri)) {
throw Error(
"Non-wildcard URL path strings must begin with a slash (otherwise they won't match anything)"
`Non-wildcard URL path strings must begin with a slash (otherwise they won't match anything) (got: ${uri})`
)
}

Expand Down

0 comments on commit f4a208b

Please sign in to comment.