TRPC Error Handling
I am using TRPC as my backend for my nextjs application. The one major problem i am facing is that, whenever I throw a new TRPC error, it crashes my frontend completely. I wanted to know whether, there is a better of handling errors and getting error message in a text ?
I am using TRPC with react query in the frontend Nextjs client and serving the api with a TRPC Express App.
2 Replies
Are you using suspense? If so you need a error boundary
I am using the new App router in the Next13.
Here is the repository link, if you want.
https://github.com/sahrohit/pracharya
GitHub
GitHub - sahrohit/pracharya
Contribute to sahrohit/pracharya development by creating an account on GitHub.