@hmcts/ccd-case-ui-toolkit 7.0.0-ConsoleLogs.1 → 7.0.0-ConsoleLogs.3
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-ccd-case-ui-toolkit.umd.js +16 -2
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/shared/components/case-editor/services/case.notifier.js +3 -1
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +10 -1
- package/esm2015/lib/shared/components/case-viewer/case-view/case-view.component.js +4 -3
- package/esm2015/lib/shared/services/http/http-error.service.js +3 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +16 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/case-editor/services/case.notifier.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -0
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-view/case-view.component.d.ts +1 -1
- package/lib/shared/components/case-viewer/case-view/case-view.component.d.ts.map +1 -1
- package/lib/shared/services/http/http-error.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2110,6 +2110,8 @@
|
|
|
2110
2110
|
};
|
|
2111
2111
|
HttpErrorService.prototype.handle = function (error, redirectIfNotAuthorised) {
|
|
2112
2112
|
if (redirectIfNotAuthorised === void 0) { redirectIfNotAuthorised = true; }
|
|
2113
|
+
console.error('Handling error in http error service.');
|
|
2114
|
+
console.error(error);
|
|
2113
2115
|
var httpError = HttpErrorService.convertToHttpError(error);
|
|
2114
2116
|
if (redirectIfNotAuthorised && (httpError.status === 401 || httpError.status === 403)) {
|
|
2115
2117
|
this.authService.signIn();
|
|
@@ -8667,12 +8669,21 @@
|
|
|
8667
8669
|
return this.http
|
|
8668
8670
|
.get(url, { headers: headers, observe: 'body' })
|
|
8669
8671
|
.pipe(operators.catchError(function (error) {
|
|
8672
|
+
console.error('Error while getting case view with getCaseViewV2!');
|
|
8673
|
+
console.error(error);
|
|
8670
8674
|
_this.errorService.setError(error);
|
|
8671
8675
|
return rxjs.throwError(error);
|
|
8672
8676
|
}), operators.finalize(function () { return _this.finalizeGetCaseViewWith(caseId, loadingToken); }));
|
|
8673
8677
|
};
|
|
8678
|
+
CasesService.prototype.syncWait = function (seconds) {
|
|
8679
|
+
var end = Date.now() + seconds * 1000;
|
|
8680
|
+
while (Date.now() < end)
|
|
8681
|
+
continue;
|
|
8682
|
+
};
|
|
8674
8683
|
CasesService.prototype.finalizeGetCaseViewWith = function (caseId, loadingToken) {
|
|
8675
8684
|
console.info("finalizeGetCaseViewWith started for " + caseId + ".");
|
|
8685
|
+
// this.syncWait(15);
|
|
8686
|
+
// throw new Error('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++');
|
|
8676
8687
|
this.loadingService.unregister(loadingToken);
|
|
8677
8688
|
console.info("finalizeGetCaseViewWith finished for " + caseId + ".");
|
|
8678
8689
|
};
|
|
@@ -9260,6 +9271,8 @@
|
|
|
9260
9271
|
.getCaseViewV2(cid)
|
|
9261
9272
|
.pipe(operators.map(function (caseView) {
|
|
9262
9273
|
console.info('mapping caseView started.');
|
|
9274
|
+
// this.casesService.syncWait(10);
|
|
9275
|
+
// throw new Error('******************************************************');
|
|
9263
9276
|
_this.cachedCaseView = classTransformer.plainToClassFromExist(new CaseView(), caseView);
|
|
9264
9277
|
_this.setBasicFields(_this.cachedCaseView.tabs);
|
|
9265
9278
|
_this.announceCase(_this.cachedCaseView);
|
|
@@ -31056,7 +31069,7 @@
|
|
|
31056
31069
|
_this.caseNotifier.announceCase(_this.caseDetails);
|
|
31057
31070
|
}))
|
|
31058
31071
|
.toPromise()
|
|
31059
|
-
.catch(function (error) { return _this.
|
|
31072
|
+
.catch(function (error) { return _this.checkErrorGettingCaseView(error); });
|
|
31060
31073
|
this.navigationSubscription = this.navigationNotifierService.navigation.subscribe(function (navigation) {
|
|
31061
31074
|
_this.navigationTriggered.emit(navigation);
|
|
31062
31075
|
});
|
|
@@ -31081,8 +31094,9 @@
|
|
|
31081
31094
|
return this.draftService
|
|
31082
31095
|
.getDraft(cid);
|
|
31083
31096
|
};
|
|
31084
|
-
CaseViewComponent.prototype.
|
|
31097
|
+
CaseViewComponent.prototype.checkErrorGettingCaseView = function (error) {
|
|
31085
31098
|
// TODO Should be logged to remote logging infrastructure
|
|
31099
|
+
console.error('Called checkErrorGettingCaseView.');
|
|
31086
31100
|
console.error(error);
|
|
31087
31101
|
if (error.status !== 401 && error.status !== 403) {
|
|
31088
31102
|
this.alertService.error(error.message);
|