@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.
- package/bundles/hmcts-ccpay-web-component.umd.js +22 -3
- package/bundles/hmcts-ccpay-web-component.umd.js.map +1 -1
- package/bundles/hmcts-ccpay-web-component.umd.min.js +1 -1
- package/bundles/hmcts-ccpay-web-component.umd.min.js.map +1 -1
- package/esm2015/lib/components/reports/reports.component.js +11 -2
- package/esm2015/lib/services/shared/error-handler.service.js +7 -3
- package/esm5/lib/components/reports/reports.component.js +11 -2
- package/esm5/lib/services/shared/error-handler.service.js +11 -3
- package/fesm2015/hmcts-ccpay-web-component.js +14 -3
- package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
- package/fesm5/hmcts-ccpay-web-component.js +18 -3
- package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
- package/hmcts-ccpay-web-component.metadata.json +1 -1
- package/lib/components/reports/reports.component.d.ts +1 -0
- package/lib/services/shared/error-handler.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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:
|
|
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
|
-
|
|
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 {
|