How to properly handle errors on the client
I throw
TRPCError
error in the procedure under certain conditions. On the client I query the procedure and check the error with isError
flag returned by hook.
The problem is it bubbles the error to the very top crashing entire application. How to stop it bubbling and make it catchable with isError
flag? The documentation is poor about handling errors on the client.
It's Next 15 with Turbopack and the "new" Tanstack React Query integration.1 Reply
Okay. That was my misunderstanding about querying. I used the suspense variant of hook. That’s reasonable to bubble error to the top then 😂