Skip to content

fix(exceptions): stop leaking internal type names in ParsingException - #128

Merged
pdevito3 merged 1 commit into
mainfrom
fm/qk-parsing-message
Sep 30, 2026
Merged

pdevito3 merged 1 commit into
mainfrom
fm/qk-parsing-message

Conversation

@pdevito3

Copy link
Copy Markdown
Owner

Summary

  • ParsingException used to append the wrapped exception's raw Message text, which could include .NET type names and Sprache parser internals visible to an API client that shows the message.
  • The message now shows only the line and column of a parse failure. The original exception stays on InnerException for full server-side detail.
  • Message-text change only: same type, same base class, same constructor signature, no change to which inputs throw or which exception type they throw.

Test plan

  • dotnet test QueryKit.UnitTests passes (386 tests)
  • Added tests asserting the message has no System., Sprache., or type-name text for a bad operator, a bad logical operator, and a value the parser rejects
  • Verified through the public API with the verify-querykit harness, against both an in-memory IEnumerable target and a real Postgres IQueryable target

ParsingException used to append the wrapped exception's raw Message, which
could include .NET type names and Sprache parser internals. It now shows
only the line and column from a parse failure, and keeps the original
exception as InnerException for full server-side detail.
@pdevito3
pdevito3 merged commit 052a6b4 into main Sep 30, 2026
2 checks passed
@pdevito3
pdevito3 deleted the fm/qk-parsing-message branch September 30, 2026 14:35
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