@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
|
@@ -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:
|
|
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
|
-
|
|
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 {
|