jonasmerlin
jonasmerlin14mo ago

Where is client side error handling documented?

In the docs, I can only find error handling for the backend. But I want to get the TRPCError code in the frontend.
3 Replies
jonasmerlin
jonasmerlinOP14mo ago
Basically, I want to get the code on the client side. Is that posible?
Alex / KATT 🐱
Alex / KATT 🐱14mo ago
Error Formatting | tRPC
The error formatting in your router will be inferred all the way to your client (& React components)
aryzing
aryzing13mo ago
@Alex / KATT 🐱 in the docs linked above, where does trpc.addPost.useMutation() come from? .useMutation() doesn't exist