how to handle error from Zod in trpc?
I would like to return error instead throwing it away so i could show user nice feedback
i found https://zod.dev/?id=safeparse
but i dont know how to implement it
GitHub
TypeScript-first schema validation with static type inference
TypeScript-first schema validation with static type inference
1 Reply
you can look at the error that it throws on the client side and display a status based on that
react query has an
error
property