Skip to content

fix(#169): decoder rejections answer 'invalid parameter' - #203

Merged
octalide merged 1 commit into
devfrom
fix/169
Sep 28, 2026
Merged

octalide merged 1 commit into
devfrom
fix/169

Conversation

@octalide

Copy link
Copy Markdown
Contributor

Closes #169

Plan: router.bad_parameter, the error every built-in decoder returns, now answers the neutral invalid parameter, since the same decoders serve path captures and form.typed query values. The router dispatch test and the query typed__route_decoders test pin the text on both paths. The Go bench comparator answers the same text so the two servers stay byte-for-byte comparable.

Decisions the issue did not settle:

  • The three router.compile sites keep invalid route parameter. They reject a route's parameter declaration at compile time, never a client value, so the text names its source correctly (the issue's "names the source" option).
  • No CHANGELOG edit. The family rule is that changelogs are written at release from the merged commits, so the release entry should note the changed public text.

Ran: mach test . --filter dispatch__typed_params and --filter typed__route_decoders, mach fmt --check on root and demo.

the router's decoders serve path captures and form.typed query values
alike, so the public text no longer names the route. the go bench
comparator answers the same text.
@octalide
octalide marked this pull request as ready for review September 28, 2026 06:01
@octalide
octalide merged commit 3bc184c into dev Sep 28, 2026
3 checks passed
@octalide octalide mentioned this pull request Sep 28, 2026
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.

router: a bad typed query value answers 'invalid route parameter'

1 participant