-
Notifications
You must be signed in to change notification settings - Fork 5
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some parser inputs are implicitly rejected due to EOF #47
Comments
I agree, ideally we never throw a TypeError, and always a ParseError. I'm going to modify the unittests to check for this, I suspect that there's more cases. |
This was referenced Aug 3, 2023
Merged
Released as v1.0.1 |
apasel422
added a commit
to apasel422/attribution-reporting-api
that referenced
this issue
Aug 3, 2023
This picks up the fix for badgateway/structured-headers#47.
apasel422
added a commit
to WICG/attribution-reporting-api
that referenced
this issue
Aug 3, 2023
This picks up the fix for badgateway/structured-headers#47.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example:
and
throw
TypeError: Cannot read properties of undefined (reading 'match')
, presumably because theParser.lookChar
() method is called viaParser.parseKey
andParser.parseBareItem
, respectively, without checkingParser.eof()
first.It would be nice to have better error messages in these cases, e.g.
ParseError: Unexpected end of input
.Perhaps
lookChar
itself could calleof()
?The text was updated successfully, but these errors were encountered: