Skip to content

Feature request: add custom ParseError object to wrap ZodErrors #2317

Closed
@am29d

Description

@am29d

Use case

We throw generic Error when the body inside envelope is invalid or forward ZodError when there is an issue with a schema. We should convert the generic error to be more specific and also wrap any ZodError. This would allow us to control any changes from Zod library and potentially add more context

Solution/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.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityparserThis item relates to the Parser Utility

Type

No type

Projects

Status

Shipped

Relationships

None yet

Development

No branches or pull requests

Issue actions