Stivo
Stivo2y ago

Right way to catch all unexpected errors before they reach the user

Hi, I was wondering, what's the right way to catch all unexpected errors (like db errors) and replace them with simple "Internal Server Error" erros, before they get to the user. Is it possible to achieve this via middleware?
1 Reply
Nick
Nick2y ago
You can pass an error formatter when creating the tRPC server