mellson
Throw custom TRPCError with specific cause
Ok, it was available in the error formatter when checking the error object. I only checked the shape and the output of the formatter. It seems you need to change the shape to include the cause. Is this intended behavior or some error on my end?
4 replies
Throw custom TRPCError with specific cause
I'm experiencing the same thing. If I throw an error on the server, something like this:
If I catch the error on the server, the cause is there. But in my errorFormatter, it is no longer present. Is the cause supposed to be present on the client side when using superjson?
4 replies
Full cache invalidation and timing problem
Thanks Alex! It was an error on my end. I put the
onSuccess
callback in the call to mutateAsync
instead of putting it on the original useMutation
🤦 After moving it there, everything works as expected.
I like your approach with putting noInvalidate
on the meta; I'll do the same for us.10 replies