Error types in catch block
Hey!
I have a mutation that I want to catch if the procedure throws an error, I'd like to get the code of the error ("UNAUTHORIZED", "FORBIDDEN" etc.) but TRCPClientError doesn't have full types (basically I can't access the code property). I saw a generic that you can pass to the error but I don't know what to pass as the generic to get the types.
Is there any way to do so?
2 Replies
@kalempster What is mutateAsync in your example code? I don’t see any use of tRPC there…
I'm sorry, mutateAsync is destructured from a mutation