@hmcts/ccd-case-ui-toolkit 6.19.0-RetryCaseRetrievals.3 → 6.19.0-RetryCaseRetrievals.4

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.
@@ -8104,10 +8104,11 @@
8104
8104
  RetryUtil.prototype.getArtificialDelayTime = function () {
8105
8105
  return this.artificialDelayOn ? this.artificialDelayPeriod : 0;
8106
8106
  };
8107
- RetryUtil.prototype.pipeTimeoutMechanismOn = function (in$, environment, timeoutPeriods) {
8107
+ RetryUtil.prototype.pipeTimeoutMechanismOn = function (in$, artificialDelayOn, timeoutPeriods) {
8108
+ console.info("Piping a retry mechanism with timeouts {" + timeoutPeriods + "}. Artificial delays added: " + artificialDelayOn + ".");
8108
8109
  this.switchOnArtificialDelays();
8109
8110
  var out$ = in$;
8110
- if (environment === 'aat') {
8111
+ if (artificialDelayOn) {
8111
8112
  out$ = this.pipeArtificialDelayOn(out$);
8112
8113
  }
8113
8114
  out$ = this.pipeTimeOutControlOn(out$, timeoutPeriods);
@@ -8757,7 +8758,7 @@
8757
8758
  .set('Content-Type', 'application/json');
8758
8759
  var loadingToken = this.loadingService.register();
8759
8760
  var http$ = this.http.get(url, { headers: headers, observe: 'body' });
8760
- this.retryUtil.pipeTimeoutMechanismOn(http$, this.appConfig.getEnvironment(), this.appConfig.getCaseRetrievalTimeouts());
8761
+ this.retryUtil.pipeTimeoutMechanismOn(http$, this.appConfig.getEnvironment() === 'aat', this.appConfig.getCaseRetrievalTimeouts());
8761
8762
  http$ = this.pipeErrorProcessor(http$);
8762
8763
  http$ = http$.pipe(operators.finalize(function () { return _this.finalizeGetCaseViewWith(caseId, loadingToken); }));
8763
8764
  return http$;