@hmcts/ccd-case-ui-toolkit 6.19.1-RetryCaseRetrievals.2 → 6.19.2-RetryCaseRetrievals.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8132,6 +8132,7 @@
8132
8132
  };
8133
8133
  RetryUtil.prototype.pipeTimeOutControlOn = function (in$, timeoutPeriods) {
8134
8134
  var timeOutAfterSeconds = timeoutPeriods[0];
8135
+ console.info("Piping timeout control with " + timeOutAfterSeconds + " seconds.");
8135
8136
  var out$ = in$.pipe(operators.timeout(timeOutAfterSeconds * 1000));
8136
8137
  return out$;
8137
8138
  };
@@ -8770,9 +8771,13 @@
8770
8771
  var http$ = this.http.get(url, { headers: headers, observe: 'body' });
8771
8772
  var artificialDelay = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
8772
8773
  var timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
8773
- if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[1] > 0) {
8774
+ console.log("Timeout periods: " + timeoutPeriods + " seconds.");
8775
+ if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[0] > 0) {
8774
8776
  http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
8775
8777
  }
8778
+ else {
8779
+ console.warn('Skipping to pipe a retry mechanism!');
8780
+ }
8776
8781
  http$ = this.pipeErrorProcessor(http$);
8777
8782
  http$ = http$.pipe(operators.finalize(function () { return _this.finalizeGetCaseViewWith(caseId, loadingToken); }));
8778
8783
  return http$;