@@ -80,7 +80,7 @@ async function pollAPI(endpoint: string, apiValidation: any, request: any): Prom
8080 let maxTimeBetweenRequests = config . maxTimeBetweenRequests ;
8181
8282 console . info ( `now trying request for ${ maxNumberOfRetries } retries` ) ;
83- while ( i < maxNumberOfRetries ) {
83+ while ( i < Number ( maxNumberOfRetries ) ) {
8484 try {
8585 apiResponse = await fetchApiResponse ( endpoint , request ) ;
8686 if ( apiResponse . status ( ) == 200 ) {
@@ -93,7 +93,7 @@ async function pollAPI(endpoint: string, apiValidation: any, request: any): Prom
9393 }
9494 i ++ ;
9595
96- console . info ( `http response completed ${ i } /${ maxNumberOfRetries } of number of reties ` ) ;
96+ console . info ( `http response completed ${ i } /${ maxNumberOfRetries } of number of retries ` ) ;
9797 await new Promise ( res => setTimeout ( res , maxTimeBetweenRequests ) ) ;
9898 }
9999
@@ -112,7 +112,7 @@ export async function pollApiForOKResponse(httpRequest: () => Promise<ApiRespons
112112 let maxTimeBetweenRequests = config . maxTimeBetweenRequests ;
113113
114114 console . info ( `now trying request for ${ maxNumberOfRetries } retries` ) ;
115- while ( i < maxNumberOfRetries ) {
115+ while ( i < Number ( maxNumberOfRetries ) ) {
116116 try {
117117 apiResponse = await httpRequest ( ) ;
118118 if ( apiResponse . status == 200 ) {
@@ -125,7 +125,7 @@ export async function pollApiForOKResponse(httpRequest: () => Promise<ApiRespons
125125 }
126126 i ++ ;
127127
128- console . info ( `http response completed ${ i } /${ maxNumberOfRetries } of number of reties ` ) ;
128+ console . info ( `http response completed ${ i } /${ maxNumberOfRetries } of number of retries ` ) ;
129129 await new Promise ( res => setTimeout ( res , maxTimeBetweenRequests ) ) ;
130130 }
131131
0 commit comments