trpc error throwing and catching on the client
Hi I am throwing an error like this on the server:
And I'd like to catch it like this on the client:
However TRPCClientError doesnt assure me that data is there, how can I check it and still have full typesafety?
1 Reply
error instanceof TRPCError
however does what I want but the error thrown by useQuery is not instance of TRPCError 😄