Samuel BarnholdtS
tRPC2y ago
3 replies
Samuel Barnholdt

Better error tracing when using TRPC routers

Hi, I'm using a trpc router and noticed that the error trace report is more or less non existent as compared to just nextjs api routes. Can I make trpc behave like this? See images for reference
Screenshot_2024-01-09_at_10.13.33.png
Screenshot_2024-01-09_at_10.12.45.png
Solution
Okay solved it. Turns out I did catch all errors in the api handler, so to get better messages in dev mode, just throwing the error fixes it
Screenshot_2024-01-09_at_10.27.39.png
Was this page helpful?