-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add an option to disable exceptions #325
Comments
For quick and dirty code, sometimes I just want the type hint without the full validation as a API is known to be wrong. I'd like a quick way to disable the run time validation while still having hints too. Would this solve for that? |
Not exactly, your use case would require to also handle data extraction from zodiosError. |
yea would love that. Right now if response does not pass validation then i'm completely stuck (other than manually modifying generated code, as wee use openapi-zod-client) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I think you can get just type hint with |
Today for error handling, since we use exceptions, we need to use error handling helpers (ie
isErrorFromAlias
andisErrorFromPath
) to check errors safely.To improve error handling, we could also have the hability to disable exceptions and then return an object encapsulating the result.
This way, we can directly return a typed error without requiring to use a helper.
The text was updated successfully, but these errors were encountered: