Skip to content

Commit fa9beed

Browse files
small small diff
1 parent 0493ccd commit fa9beed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/error.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,9 +1239,7 @@ export function needsRetryableWriteLabel(error: Error, maxWireVersion: number):
12391239
}
12401240

12411241
if (error instanceof MongoWriteConcernError) {
1242-
return RETRYABLE_WRITE_ERROR_CODES.has(
1243-
error.result.writeConcernError?.code ?? error?.code ?? 0
1244-
);
1242+
return RETRYABLE_WRITE_ERROR_CODES.has(error.result?.code ?? error.code ?? 0);
12451243
}
12461244

12471245
if (error instanceof MongoError && typeof error.code === 'number') {

0 commit comments

Comments
 (0)