-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing validation issue details in REPL #4
Comments
@jasalt |
@smeghead I'm not sure how much is correct to put into exception message. However, some way to provide detailed info in REPL would be useful. Example of some Clojure Malli Schema error output https://github.com/metabase/metabase/wiki/Backend:-Metabase-Malli-Cheatsheet#validation. |
@jasalt As a way to display (defmacro z-explain [& body]
`(try
,@body
(catch \Phel\PhelSchema\ZodError e
(php/-> e (getIssues)))) If
|
I had trouble in REPL not seeing any more detailed validation issue information than just
ZodError
without any message.If I understood, the thrown ZodError exception would have to be caught and handled, or
safe-parse
output be checked instead, both manually, making interactive development not so convenient with the library.I did not save a screenshot or anything as I was in a hurry switching from the library to a DIY solution, but can add extra details about reproducing if it can be of help.
The text was updated successfully, but these errors were encountered: