Skip to content

Commit 27e049c

Browse files
abortTransaction and commitTransaction - squash errors
1 parent 905e94d commit 27e049c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sessions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,14 @@ export class ClientSession extends TypedEventEmitter<ClientSessionEvents> {
419419
* Commits the currently active transaction in this session.
420420
*/
421421
async commitTransaction(): Promise<void> {
422-
return await endTransaction(this, 'commitTransaction');
422+
return await endTransaction(this, 'commitTransaction').catch(e => squashError(e));
423423
}
424424

425425
/**
426426
* Aborts the currently active transaction in this session.
427427
*/
428428
async abortTransaction(): Promise<void> {
429-
return await endTransaction(this, 'abortTransaction');
429+
return await endTransaction(this, 'abortTransaction').catch(e => squashError(e));
430430
}
431431

432432
/**

0 commit comments

Comments
 (0)