Replies: 1 comment 2 replies
-
Unfortunately, we do not have a perfect answer to this. But you could try to return the input and use the third argument of |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have such schema
And use it like this
If
JSON.parse(...)
throws an error, how can I notify aValibot
that this error is expected and just return a message like "JSON parse failed" insideresult.issues
? Currently (without atry
/catch
), it throws an error, andsafeParse
doesn't handle it.Beta Was this translation helpful? Give feedback.
All reactions