You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I'm currently trying to achieve is display an error page on validation error, since, as you can see, my PostsSchema is waiting for the body to be a number, purely for testing purposes of course.
It only works when I await suspense() at the end of my script setup, or if I try/catch the parse from Valibot (same thing happens with parse from Zod) and throw a showError. createError with fatal: true is also not an option for some reason I'm not getting.
I recon I must be misunderstanding some things along the way.
Describe the bug
Shouldn't my return parse(PostsSchema, response) trigger an error, then the queryFn should do something so I'm not left with a blank page and no error feedback at all?
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Reproduction
StackBlitz reproduction
What I'm currently trying to achieve is display an error page on validation error, since, as you can see, my
PostsSchema
is waiting for the body to be anumber
, purely for testing purposes of course.It only works when I
await suspense()
at the end of myscript setup
, or if Itry/catch
theparse
from Valibot (same thing happens withparse
fromZod
) and throw ashowError
.createError
withfatal: true
is also not an option for some reason I'm not getting.I recon I must be misunderstanding some things along the way.
Describe the bug
Shouldn't my
return parse(PostsSchema, response)
trigger an error, then thequeryFn
should do something so I'm not left with a blank page and no error feedback at all?Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: