OuiOuiCroissantO
Convex Community6mo ago
5 replies
OuiOuiCroissant

Manual rollback / error paths in mutations

I’d like to insert specific “error event” documents into the database whenever certain mutations fail. These are used to provide observability to the customer, and not just the developers that can access the db logs.

Is there a way to manually rollback on error and continue the mutation in an error path?
I understand a possible solution might be to use and action catching the mutation and invoking another mutation on error. Is there any other “mutation only” way? (From what I understand actions are a bit heavier so if possible doing everything in a mutation would be great)
Was this page helpful?