Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork437
Show problematic url#358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Sorry, forgot to mention issue#336 |
@@ -203,7 +203,7 @@ class Iter { | |||
if (value !== undefined) return value; | |||
const { type: nextType, index } = this.peek(); | |||
throw new TypeError( | |||
`Unexpected ${nextType} at ${index}, expected ${type}: ${DEBUG_URL}`, | |||
`Unexpected ${nextType} at ${index}, expected ${type}: ${str}; Visit ${DEBUG_URL} for more information.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think we have access tostr
in this method.
@@ -575,7 +575,7 @@ function toRegExp(tokens: Flattened[], delimiter: string, keys: Keys) { | |||
if (token.type === "param" || token.type === "wildcard") { | |||
if (!isSafeSegmentParam && !backtrack) { | |||
throw new TypeError(`Missing text after "${token.name}": ${DEBUG_URL}`); | |||
throw new TypeError(`Missing text after "${token.name}": ${str}; Visit ${DEBUG_URL} for more information.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
No originalstr
here either. We need to make some changes to pass it around as some methods support just acceptingTokenData
only.
Show the URL that is giving the error to help debugging instead of just giving the debug url.