Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment to ZodError.message getter noting that it returns JSON #3937

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aaronhipple
Copy link

Per #2883, there seems to be quite a bit of confusion around the meaning of the ZodError.message field (which returns JSON instead of a simple human-readable error message, as one might expect given the name).

Unsure how intentional the current behavior is or if the field is meant to be used at all (I don't see it directly in docs (https://zod.dev/?id=error-handling, https://zod.dev/ERROR_HANDLING), but at the very least an explanatory comment would be helpful and wouldn't be a breaking change.

Copy link

netlify bot commented Jan 7, 2025

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c2750a0
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/677d895a03973b00088461a5
😎 Deploy Preview https://deploy-preview-3937--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@aaronhipple aaronhipple changed the title Add comment to message getter noting that it returns JSON Add comment to ZodError.message getter noting that it returns JSON Jan 7, 2025
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