Registry Mirror
Skip to content

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Nov 30, 2026

Copy link
Copy Markdown
Member

Backport of #2570 to 1.x.

  • toPublicSchemaIssue now stops the path at the first segment whose key isn't a property key. Valibot puts the raw input value there for map keys (and null for set items), so it was sent back to the client.
  • StandardHandler falls back to a plain INTERNAL_SERVER_ERROR (with the encoding error as cause) when encoding an error fails, so handle always returns a response.

…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.
@pullfrog

pullfrog Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

This run was cancelled before it finished.

Pullfrog  | View workflow run | via Pullfrog

@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 54161f0d-7af6-4b1a-a7ea-4367f4d77424

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dinwwwh
dinwwwh merged commit 3eb68fc into 1.x Nov 30, 2026
4 of 5 checks passed
@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

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
Follow-up to #2571. When encoding an error fails, the
fallback now calls `setSpanError(span, cause)` before returning the 500,
so the failure still shows up in traces (same as #2570 on
main).
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.
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