File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1240,13 +1240,13 @@ export function needsRetryableWriteLabel(
1240
1240
}
1241
1241
}
1242
1242
1243
- // For writeConcernErrors from a pre-4.4 mongos response, do not use the code to determine retryability.
1244
- const isShardedAndPre4_4 = isSharded && maxWireVersion <= 9 ;
1243
+ // For writeConcernErrors from a pre-4.4 mongos response, do not use the error code to determine retryability.
1244
+ const isShardedAndPre4_4 = isSharded && maxWireVersion < 9 ;
1245
1245
if ( error instanceof MongoWriteConcernError && ! isShardedAndPre4_4 ) {
1246
1246
return RETRYABLE_WRITE_ERROR_CODES . has ( error . result ?. code ?? error . code ?? 0 ) ;
1247
1247
}
1248
1248
1249
- if ( error instanceof MongoError && typeof error . code === 'number' && ! isShardedAndPre4_4 ) {
1249
+ if ( error instanceof MongoError && typeof error . code === 'number' ) {
1250
1250
return RETRYABLE_WRITE_ERROR_CODES . has ( error . code ) ;
1251
1251
}
1252
1252
You can’t perform that action at this time.
0 commit comments