Skip to content

Commit 6cbc405

Browse files
committed
Ignore exceptions during rollback
1 parent 7873694 commit 6cbc405

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/node/src/db/BetterSQLite3DBAdapter.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,12 @@ export class BetterSQLite3DBAdapter extends BaseObserver<DBAdapterListener> impl
226226
await commit();
227227
return result;
228228
} catch (ex) {
229-
await rollback();
229+
try {
230+
await rollback();
231+
} catch (ex2) {
232+
// In rare cases, a rollback may fail.
233+
// Safe to ignore.
234+
}
230235
throw ex;
231236
}
232237
}

0 commit comments

Comments
 (0)