How to handle multiple errors in (react query) using (hono rpc)?
How can I handle multiple errors like in my case?
I want to display the error on my signup form layout.
5 Replies
Can you show the full code?
The popup is blocking some, also how you set the types for RPC
I want to get the error message from hono, but there's a type error, even the type of
ResponseType
is { error: string } | { data: string }
I want to display on my sign up layout that multiple error like if Username is already exist
or Email is already exist
Curious about this
I myself had to do this in my useQuery instances on the client side
Would love to set this at the
hc
client level
Or create a typesafe function that receives the $get or $post return and apply that validation without loosing typesafetywhere did you add this code?
It should go between your response and data variables. You want it before you convert to JSON