@hmcts/ccpay-web-component 5.0.7-beta05 → 5.0.7-beta06

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.
@@ -720,16 +720,24 @@ var ErrorHandlerService = /** @class */ (function () {
720
720
  };
721
721
  /**
722
722
  * @param {?} isErrorExist
723
+ * @param {?=} isDataNotExist
724
+ * @param {?=} error
723
725
  * @return {?}
724
726
  */
725
727
  ErrorHandlerService.prototype.getServerErrorMessage = /**
726
728
  * @param {?} isErrorExist
729
+ * @param {?=} isDataNotExist
730
+ * @param {?=} error
727
731
  * @return {?}
728
732
  */
729
- function (isErrorExist) {
733
+ function (isErrorExist, isDataNotExist, error) {
734
+ if (isDataNotExist === void 0) { isDataNotExist = false; }
735
+ if (error === void 0) { error = ''; }
736
+ /** @type {?} */
737
+ var bodyContent = isDataNotExist ? error : 'Try again later';
730
738
  return {
731
739
  title: "There is a problem with the service",
732
- body: "Try again later",
740
+ body: bodyContent,
733
741
  showError: isErrorExist
734
742
  };
735
743
  };
@@ -8373,7 +8381,14 @@ var ReportsComponent = /** @class */ (function () {
8373
8381
  */
8374
8382
  function (error) {
8375
8383
  _this.isDownLoadButtondisabled = false;
8376
- _this.errorMessage = _this.errorHandlerService.getServerErrorMessage(true);
8384
+ /** @type {?} */
8385
+ var errorContent = error.replace(/[^a-zA-Z ]/g, '').trim();
8386
+ /** @type {?} */
8387
+ var statusCode = error.replace(/[^a-zA-Z0-9 ]/g, '').trim().split(' ')[0];
8388
+ if (statusCode === '404') {
8389
+ _this.errorHandlerService.getServerErrorMessage(true, true, errorContent);
8390
+ }
8391
+ _this.errorHandlerService.getServerErrorMessage(true);
8377
8392
  }));
8378
8393
  }
8379
8394
  else {