tRPCttRPC
Powered by
sh03S
tRPC•3y 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
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

tRPC, NextJS 14, createTRPCProxyClient, How can I globally manage errors?
BillyBobBBillyBob / ❓-help
3y ago
how to handle non-trpc errors?
pupoPpupo / ❓-help
7mo ago