is it possible to set a response middleware on Vanilla trpc client?
I have a vue app and I want to set a middleware on the response, whenever I get a response if I find any errors I will show a snackbar of the error, and I want that my trpc...router.query/mutation will never throw an error, because my response middleware will cache it. is it possible to do?
to cache the error I can do something like this
but if I don't wrap my
in try/catch
it will throw an error...
1 Reply
I expect this would be a Link, which you can definitely write for yourself. But I’m really not totally sure of the capabilities of links without consulting the docs and having a play