diff --git a/src/lib/db/transaction.ts b/src/lib/db/transaction.ts index 0fa5905ac7..96e9546c00 100644 --- a/src/lib/db/transaction.ts +++ b/src/lib/db/transaction.ts @@ -93,10 +93,11 @@ export function withRollback( const service = serviceFactory(db) as WithRollback; service.rollback = async (fn: (service: S) => R) => { - const trx = await db.transaction({ isolationLevel: 'serializable' }); + const trx = await db.transaction(); try { const transactionService = serviceFactory(trx); - return fn(transactionService); + const result = await fn(transactionService); + return result; } finally { await trx.rollback(); }