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
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1194208257665945670/Screenshot_2024-01-09_at_10.13.33.png)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1194208258014056508/Screenshot_2024-01-09_at_10.12.45.png)
Solution:
Jump to 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
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1194211172170338375/Screenshot_2024-01-09_at_10.27.39.png)
1 Reply
Solution![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1194211172170338375/Screenshot_2024-01-09_at_10.27.39.png)
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
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1194211172170338375/Screenshot_2024-01-09_at_10.27.39.png)