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

Decorators aren't able to catch zod's parsing error #2

Open
DavideCarvalho opened this issue Feb 5, 2023 · 0 comments
Open

Decorators aren't able to catch zod's parsing error #2

DavideCarvalho opened this issue Feb 5, 2023 · 0 comments

Comments

@DavideCarvalho
Copy link

While issue #1 is not fixed, I tried creating a decorator to change the returning type from text to json

What happens is that I'm unable to get zod's parsing error

From the picture below, It will never reach the catch block if the request schema is wrong. I think we should be able to also catch zod's parsing error and work with it accordingly

image

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

No branches or pull requests

1 participant