File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -767,9 +767,9 @@ async function endTransaction(
767
767
) ;
768
768
await partiallyHandleFirstCommandAttempt ( ) ;
769
769
commandHandler ( ) ;
770
- } catch ( err ) {
770
+ } catch ( firstAttemptErr ) {
771
771
await partiallyHandleFirstCommandAttempt ( ) ;
772
- if ( err instanceof MongoError && isRetryableWriteError ( err ) ) {
772
+ if ( firstAttemptErr instanceof MongoError && isRetryableWriteError ( firstAttemptErr ) ) {
773
773
// SPEC-1185: apply majority write concern when retrying commitTransaction
774
774
if ( command . commitTransaction ) {
775
775
// per txns spec, must unpin session in this case
@@ -790,11 +790,11 @@ async function endTransaction(
790
790
} )
791
791
) ;
792
792
commandHandler ( ) ;
793
- } catch ( err2 ) {
794
- commandHandler ( err2 ) ;
793
+ } catch ( secondAttemptErr ) {
794
+ commandHandler ( secondAttemptErr ) ;
795
795
}
796
796
} else {
797
- commandHandler ( err ) ;
797
+ commandHandler ( firstAttemptErr ) ;
798
798
}
799
799
}
800
800
}
You can’t perform that action at this time.
0 commit comments