File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import path from 'node:path'
6
6
import readline from 'node:readline'
7
7
8
8
import abortSignal from '@socketsecurity/registry/lib/constants/abort-signal'
9
+ import { pRetry } from '@socketsecurity/registry/lib/promises'
9
10
10
11
// @ts -ignore: Avoid TS import attributes error.
11
12
import rootPkgJson from '../package.json' with { type : 'json' }
@@ -411,7 +412,12 @@ export class SocketSdk {
411
412
) : AsyncGenerator < BatchPackageFetchResultType > {
412
413
let res : IncomingMessage | undefined
413
414
try {
414
- res = await this . #createBatchPurlRequest( queryParams , componentsObj )
415
+ res = await pRetry (
416
+ ( ) => this . #createBatchPurlRequest( queryParams , componentsObj ) ,
417
+ {
418
+ retries : 4
419
+ }
420
+ )
415
421
} catch ( e ) {
416
422
return await this . #handleApiError< 'batchPackageFetch' > ( e )
417
423
}
You can’t perform that action at this time.
0 commit comments