Feature request: add custom ParseError object to wrap ZodErrors #2317
Labels
completed
This item is complete and has been merged/shipped
feature-request
This item refers to a feature request for an existing or new utility
parser
This item relates to the Parser Utility
Milestone
Use case
We throw generic
Error
when the body inside envelope is invalid or forwardZodError
when there is an issue with a schema. We should convert the generic error to be more specific and also wrap anyZodError
. This would allow us to control any changes from Zod library and potentially add more contextSolution/User Experience
Create
ParseError
to throw either error specific to envelopes or schemas.Alternative solutions
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: