[Solved] Unhandled Runtime Error
i am throwing TRPCError from trpc mutation how can I handle it on the client I am getting 1 of 1 Unhandled Error
7 Replies
is this because I am runnning in dev ?
... you need to provide that actual error and the relevant code
@Samathingamajig I am basically throwing
trpc.TRPCError
from mutation router
how should I handle it in the client side?wrap the mutation call in a
try { } catch {}
it i already in the try catch block
it doesn't catch
how ever i do have
onError
on the trpc.useMutation
and it does catch the error but still causes thise Unhandled Runtime Error
Oh ok it is because I forgot the await
and since it is async mutateyea