Customizing the TRPCError type

I can't find anything in the docs about customizing the TRPCError type if I need to transmit extra properties etc along with the errors, or adding custom error codes. Can I amend the TRPCError type with my own interface? What is the "correct" way to do this?
2 Replies
v28
v282mo ago
hi, did you figure this out. I am also curious
functiondj
functiondj2mo ago
Error Formatting | tRPC
The error formatting in your router will be inferred all the way to your client (& React components)

Did you find this page helpful?