Skip to content

Commit c0be8f8

Browse files
martinfrancoispaulmelnikow
authored andcommitted
feat: improve error output by showing which URL caused the error (#1735)
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 11dba99 commit c0be8f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/interceptor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function Interceptor(scope, uri, method, requestBody, interceptorOptions) {
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)