causaly / zod-validation-error

Wrap zod validation errors in user-friendly readable messages
MIT License
813 stars 11 forks source link

Track the originating ZodError as `cause` #210

Closed arty-name closed 10 months ago

arty-name commented 10 months ago

The standard Error class now has a standard property cause, and the support for it slowly spreads in the tools.

I believe it would be nice to have the original ZodError to be available as the cause property of the ValidationError.

jmike commented 10 months ago

I agree, wanted to do this for a while. However it will result in a breaking change. Therefore, we need to bump the major version after the change has been implemented and approved.

arty-name commented 10 months ago

Thank you very much Dimitris!