Starlord
Starlord4mo ago

If one of the db executions fails or any

If one of the db executions fails or any other exception than full mutation fails as if nothing happened
2 Replies
itaied
itaied4mo ago
how does it happen? handler is wrapped in transact commit? for example, if i have an handler
await ctx.db.insert(...);
await ctx.db.insert(...);
await ctx.db.update(...);
await ctx.db.insert(...);
await ctx.db.insert(...);
await ctx.db.update(...);
when the third op fail, how does convex reroll the first 2 ops? and what is i do not call await?
Starlord
StarlordOP4mo ago
all calls to db are done in single transaction. if one fails all fail and you need to use await or promise all

Did you find this page helpful?