@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.
@@ -710,16 +710,28 @@
710
710
  };
711
711
  /**
712
712
  * @param {?} isErrorExist
713
+ * @param {?=} isDataNotExist
714
+ * @param {?=} error
713
715
  * @return {?}
714
716
  */
715
717
  ErrorHandlerService.prototype.getServerErrorMessage = /**
716
718
  * @param {?} isErrorExist
719
+ * @param {?=} isDataNotExist
720
+ * @param {?=} error
717
721
  * @return {?}
718
722
  */
719
- function (isErrorExist) {
723
+ function (isErrorExist, isDataNotExist, error) {
724
+ if (isDataNotExist === void 0) {
725
+ isDataNotExist = false;
726
+ }
727
+ if (error === void 0) {
728
+ error = '';
729
+ }
730
+ /** @type {?} */
731
+ var bodyContent = isDataNotExist ? error : 'Try again later';
720
732
  return {
721
733
  title: "There is a problem with the service",
722
- body: "Try again later",
734
+ body: bodyContent,
723
735
  showError: isErrorExist
724
736
  };
725
737
  };
@@ -8247,7 +8259,14 @@
8247
8259
  * @return {?}
8248
8260
  */function (error) {
8249
8261
  _this.isDownLoadButtondisabled = false;
8250
- _this.errorMessage = _this.errorHandlerService.getServerErrorMessage(true);
8262
+ /** @type {?} */
8263
+ var errorContent = error.replace(/[^a-zA-Z ]/g, '').trim();
8264
+ /** @type {?} */
8265
+ var statusCode = error.replace(/[^a-zA-Z0-9 ]/g, '').trim().split(' ')[0];
8266
+ if (statusCode === '404') {
8267
+ _this.errorHandlerService.getServerErrorMessage(true, true, errorContent);
8268
+ }
8269
+ _this.errorHandlerService.getServerErrorMessage(true);
8251
8270
  }));
8252
8271
  }
8253
8272
  else {