File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ export function executeOperation<
86
86
owner = Symbol ( ) ;
87
87
session = topology . startSession ( { owner, explicit : false } ) ;
88
88
} else if ( session . hasEnded ) {
89
+ // TODO: Change this out for MongoExpiredSessionError
89
90
return cb ( new MongoDriverError ( 'Use of expired sessions is not permitted' ) ) ;
90
91
}
91
92
} else if ( session ) {
@@ -127,6 +128,7 @@ function executeWithServerSelection(
127
128
128
129
if ( inTransaction && ! readPreference . equals ( ReadPreference . primary ) ) {
129
130
callback (
131
+ // TODO: Change this out for MongoTransactionError
130
132
new MongoDriverError (
131
133
`Read preference in a transaction must be primary, not: ${ readPreference . mode } `
132
134
)
@@ -188,6 +190,7 @@ function executeWithServerSelection(
188
190
session . inTransaction ( )
189
191
) {
190
192
callback (
193
+ // TODO: Change this out for MongoTransactionError
191
194
new MongoDriverError (
192
195
`Read preference in a transaction must be primary, not: ${ readPreference . mode } `
193
196
)
You can’t perform that action at this time.
0 commit comments