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

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

Closed
1 of 2 tasks
am29d opened this issue Apr 4, 2024 · 3 comments
Closed
1 of 2 tasks

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

am29d opened this issue Apr 4, 2024 · 3 comments
Assignees
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

Comments

@am29d
Copy link
Contributor

am29d commented Apr 4, 2024

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.

@am29d am29d added triage This item has not been triaged by a maintainer, please wait feature-request This item refers to a feature request for an existing or new utility labels Apr 4, 2024
@am29d am29d added this to the Parser - Beta Release milestone Apr 4, 2024
@am29d am29d self-assigned this Apr 4, 2024
@am29d am29d added parser This item relates to the Parser Utility confirmed The scope is clear, ready for implementation and removed triage This item has not been triaged by a maintainer, please wait labels Apr 4, 2024
@github-actions github-actions bot added pending-release This item has been merged and will be released soon and removed confirmed The scope is clear, ready for implementation labels Apr 9, 2024
@am29d am29d closed this as completed Apr 10, 2024
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

This comment was marked as outdated.

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Apr 10, 2024
@dreamorosi
Copy link
Contributor

This is now released under v2.1.0 version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Development

No branches or pull requests

2 participants