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

Don't include received value in enum/literal error messages (fixes #461) #777

Merged
merged 2 commits into from
Dec 30, 2021
Merged

Don't include received value in enum/literal error messages (fixes #461) #777

merged 2 commits into from
Dec 30, 2021

Conversation

pasieronen
Copy link
Contributor

@pasieronen pasieronen commented Nov 22, 2021

See #461

Also the error produced by ZodLiteral did not actually match the ZodInvalidTypeIssue interface or ERROR_HANDLING.md documentation (expected and received were not actually ZodParsedTypes)

Also, don't include the received value (could be sensitive or unsafe to log)
Copy link
Collaborator

@scotttrinh scotttrinh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support this stance in general, and this PR in particular looks good to me! I'm not sure what we consider our "compatibility" responsibility with regards to message strings, so I'd love to here from @colinhacks before merging.

@colinhacks
Copy link
Owner

LGTM - Changes to error language don't merit a major version bump imo so let's merge

I'll publish a minor release with this and some other changes this weekend.

@colinhacks colinhacks merged commit a118887 into colinhacks:master Dec 30, 2021
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.

3 participants