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