Skip to content

Commit ca26998

Browse files
committed
refactor: just assign read errors to write errors
1 parent 26842bb commit ca26998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/error.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ const RETRYABLE_READ_ERROR_CODES = new Set<number>([
11501150
]);
11511151

11521152
// see: https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.rst#terms
1153-
const RETRYABLE_WRITE_ERROR_CODES = new Set<number>([...RETRYABLE_READ_ERROR_CODES]);
1153+
const RETRYABLE_WRITE_ERROR_CODES = RETRYABLE_READ_ERROR_CODES;
11541154

11551155
export function needsRetryableWriteLabel(error: Error, maxWireVersion: number): boolean {
11561156
// pre-4.4 server, then the driver adds an error label for every valid case

0 commit comments

Comments
 (0)