sh03S
tRPC3y ago
5 replies
sh03

How to manage custom errors (e.g. custom error codes) in tRPC?

What's the recommended way to add fields to a TRPCError? How do you make that typesafe also on the client (e.g. custom error code is a specific union type).
Thanks
Was this page helpful?