trpc-ultra icon indicating copy to clipboard operation
trpc-ultra copied to clipboard

How to recover TRPC Errors thrown in client without Try Catch

Open cnava9389 opened this issue 2 years ago • 0 comments

So I have TRPC working nicely in a project but my only issue is that I cannot find a way to recover an error before it crashes the app. per the documentation here https://trpc.io/docs/error-handling throwing an error should result in returning an object containing error info that I presume should be passed into the query result as error, but instead I have to place a try catch around each query. is there not a better way of doing this that uses the error object in query result, or am I doing it wrong

cnava9389 avatar Dec 06 '22 22:12 cnava9389