We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 729d992 commit 361c807Copy full SHA for 361c807
src/error.ts
@@ -1241,7 +1241,7 @@ export function needsRetryableWriteLabel(
1241
}
1242
1243
// For writeErrors and writeConcernErrors from a pre-4.4 mongos response, do not use the code to determine retryability.
1244
- const isShardedAndPre4_4 = !isSharded && maxWireVersion >= 9;
+ const isShardedAndPre4_4 = isSharded && maxWireVersion >= 9;
1245
1246
if (error instanceof MongoWriteConcernError && !isShardedAndPre4_4) {
1247
return RETRYABLE_WRITE_ERROR_CODES.has(error.result?.code ?? error.code ?? 0);
0 commit comments