Skip to content

Use a specific message for end-of-file parse errors#5613

Merged
rmosolgo merged 2 commits intomasterfrom
fix-parser-error-message
Apr 27, 2026
Merged

Use a specific message for end-of-file parse errors#5613
rmosolgo merged 2 commits intomasterfrom
fix-parser-error-message

Conversation

@rmosolgo
Copy link
Copy Markdown
Owner

@rmosolgo rmosolgo commented Apr 27, 2026

Oops, this case of parser error message started giving the wrong debug info after 88d6c1c.

It was because @scanner.matched_size.nil? was now true/false in slightly different circumstances, depending on whether the query had comments or ignored characters in it.

I tried to preserve compatibility as-is, but it didn't seem like the right move. Instead, I'm adding a specific end-of-file debug message in this case, like GraphQL-CParser already has.

@rmosolgo rmosolgo added this to the 2.6.2 milestone Apr 27, 2026
@rmosolgo rmosolgo changed the title Fix debug string in ParseError message Use a specific message for end-of-file parse errors Apr 27, 2026
@rmosolgo rmosolgo merged commit 28aba09 into master Apr 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant