TRPC error handling
Hey guys. I'm currently looking for some advice in regards to handling errors on my trpc endpoints.
My current implementation is as follows:
This is a quick example showing what i would like to display when an error occurs, but it doesn't feel very nice... is there any alternatives?
3 Replies
You can specify predefined error codes and display some user friendly message for each of them. The actual error message could be somewhere in your internal logs
Thank you 🙂
so many questions about trpc error handling in the app router but no answers