Handling errors on the front-end
I'm making a mutation from my front-end and I intentionally throw a new TRPCError on my backend, I can see the trpc error on both client and server console but I don't understand how to catch it in the front-end
The mutation onError does nothing, myMutation.isError is false, myMutation.error is null and status "idle"
Here's some example code
And then on my code
How I throw the error
I also tried this
Pretty sure I'm just missing something here so a little help would be appreciated, thank you!
The mutation onError does nothing, myMutation.isError is false, myMutation.error is null and status "idle"
Here's some example code
And then on my code
How I throw the error
I also tried this
Pretty sure I'm just missing something here so a little help would be appreciated, thank you!