Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to recover TRPC Errors thrown in client without Try Catch #3

Open
cnava9389 opened this issue Dec 6, 2022 · 0 comments
Open

How to recover TRPC Errors thrown in client without Try Catch #3

cnava9389 opened this issue Dec 6, 2022 · 0 comments

Comments

@cnava9389
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant