Skip to content

Commit dc82f62

Browse files
firefoxNXBhatia, Vineet
andauthored
fix: add more retryable status and error codes during downloads (#936)
Co-authored-by: Bhatia, Vineet <[email protected]>
1 parent 8dfe573 commit dc82f62

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

packages/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,20 @@ import { RequestOptions } from 'https';
1919

2020
const log = debug('MongoMS:MongoBinaryDownload');
2121

22-
const retryableStatusCodes = [503, 500];
23-
const retryableErrorCodes = ['ECONNRESET', 'ETIMEDOUT', 'ENOTFOUND', 'ECONNREFUSED'];
22+
const retryableStatusCodes = [429, 500, 503];
23+
24+
const retryableErrorCodes = [
25+
'ECONNRESET',
26+
'ETIMEDOUT',
27+
'ENOTFOUND',
28+
'ECONNREFUSED',
29+
'EPIPE',
30+
'EHOSTUNREACH',
31+
'EAI_AGAIN',
32+
'ENETUNREACH',
33+
'ECONNABORTED',
34+
'aborted',
35+
];
2436

2537
export interface MongoBinaryDownloadProgress {
2638
current: number;

0 commit comments

Comments
 (0)