T
tRPC

❓-help

How are thrown (unhandled) exceptions safe to pass?

JJuzTim12/22/2023
Hi, I started looking into error handling more and understand that all errors get wrapped in a TRPCError, however sometimes exceptions contain sensitive data. How does TRPC make sure that data doesnt get leaked to the client?
Nnlucas12/23/2023
In prod mode I don't believe these get sent back to the client in the same way, try changing NODE_ENV to see errorFormatter is what you want though, gives you full control

Looking for more? Join the community!