DCsanD
Convex Community3y ago
8 replies
DCsan

pattern for handling failed TXs

if i have a DB mutation that fails, eg buying something but the user doesn't have enough balance... is there a simple way to handle this?

eg can a useMutation return a value?
should I 'throw' inside the mutation fn and then catch in the main client code?

what other options are there?
I'd prefer to avoid something like a totally different out-of-band "errors" list
Was this page helpful?