Conversation
…ema issues `toPublicSchemaIssue` assumed every path segment key is a property key. Valibot map key issues put the raw input key there, and set issues use `key: null`, so a validation error could echo arbitrary input values. The public path now stops at the first segment whose key is not a property key. `StandardHandler.handle` now falls back to a plain INTERNAL_SERVER_ERROR (with the encoding error as `cause`) when `codec.encodeError` throws, so `handle` resolves with a response instead of rejecting.
Contributor
|
This run was cancelled before it finished. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
dinwwwh
added a commit
that referenced
this pull request
Nov 30, 2026
dinwwwh
added a commit
that referenced
this pull request
Dec 1, 2026
#2577) Backport of #2576 to 1.x. Reverts the fallback added in #2571 and #2572. When `codec.encodeError` throws, `StandardHandler.handle` now rejects with that error instead of returning a plain `INTERNAL_SERVER_ERROR`. - The fallback hid the failure: it was only recorded on the span, which most users don't have. - It saved nothing: the expensive part (e.g. a stack overflow) has already happened by then. - Validation issues no longer echo input (#2567, #2571), so an encoding failure is now usually a bug in the app's error data, which should surface to root interceptors, logging plugins and the server framework. - The error is still recorded on the span when it propagates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Backport of #2570 to 1.x.
toPublicSchemaIssuenow stops the path at the first segment whose key isn't a property key. Valibot puts the raw input value there for map keys (andnullfor set items), so it was sent back to the client.StandardHandlerfalls back to a plainINTERNAL_SERVER_ERROR(with the encoding error ascause) when encoding an error fails, sohandlealways returns a response.