amppA
Convex Community2y ago
2 replies
ampp

mutations and try catch errors.

I've been wanting to catch errors from my event system that can run sets of mutations.

From what i understood is that mutations wrapped with a try/catch no longer have any benefits of mutations. Basically it will execute/write everything up till the error right? I tested this.
in
 try {
await saveEventMutation(
} catch (err)
{
await saveEventMutationError(
}

both get ran. I only want to log a error of the event.

I'm guessing the only way to do this without both functions saving data is to do it via a try catch within a action? Then that forces me to schedule actions via mutations in many cases.
Was this page helpful?