File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -136,9 +136,9 @@ export default class BrowserDataManager extends BaseDataManager {
136136 let lastError : any ;
137137 let validMaxRetries = maxRetries ?? 3 ;
138138
139- if ( validMaxRetries < 0 ) {
139+ if ( Number . isNaN ( validMaxRetries ) || validMaxRetries < 0 ) {
140140 this . logger . warn (
141- `initialPollingRetries is set to ${ maxRetries } , which is less than 0. This is not supported and will be ignored . Defaulting to 3 retries.` ,
141+ `initialPollingRetries is set to an invalid value: ${ maxRetries } . Defaulting to 3 retries.` ,
142142 ) ;
143143 validMaxRetries = 3 ;
144144 }
@@ -152,12 +152,12 @@ export default class BrowserDataManager extends BaseDataManager {
152152 throw e ;
153153 }
154154 lastError = e ;
155- this . _debugLog ( httpErrorMessage ( e , 'initial poll request' , 'will retry' ) ) ;
156155 // NOTE: current we are hardcoding the retry interval to 1 second.
157156 // We can make this configurable in the future.
158157 // TODO: Reviewer any thoughts on this? Probably the easiest thing is to make this configurable
159158 // however, we can also look into using the backoff logic to calculate the delay?
160159 if ( attempt < validMaxRetries ) {
160+ this . _debugLog ( httpErrorMessage ( e , 'initial poll request' , 'will retry' ) ) ;
161161 // eslint-disable-next-line no-await-in-loop
162162 await sleep ( 1000 ) ;
163163 }
You can’t perform that action at this time.
0 commit comments