trpc-ultra
trpc-ultra copied to clipboard
How to recover TRPC Errors thrown in client without Try Catch
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