Proper way to handle TRPC server errors on client?
I have some code that looks a little like this, but I'm not too sure what we should be putting in the catch for typing the error. I'm just using the default t3 stack error formatter. Is there a built in type for the client I can use that doesn't require me to JSON.parse the error object?
1 Reply
maybe mutateAsync is an anti pattern... if I use subscribe.error I get all the types
or I should just use with the options param like so: