monkey-front-core 0.0.596 → 0.0.598
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/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +4 -16
- package/fesm2015/monkey-front-core.mjs +3 -15
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +3 -15
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/monkey-front-core-0.0.598.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.596.tgz +0 -0
|
@@ -5227,11 +5227,8 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
|
|
|
5227
5227
|
}
|
|
5228
5228
|
showMessage(message, error, mkc) {
|
|
5229
5229
|
const { snackbarService } = this;
|
|
5230
|
-
|
|
5231
|
-
console.log(error.status);
|
|
5232
|
-
if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
|
|
5230
|
+
if (!this.isHttpCodeIgnoreMessage(mkc, error.status) || error.status === 401) {
|
|
5233
5231
|
const keepOnUrlChange = error.status === 401;
|
|
5234
|
-
console.log('keepOnUrlChange', keepOnUrlChange);
|
|
5235
5232
|
snackbarService.show({
|
|
5236
5233
|
title: this.__i18n?.TITLE,
|
|
5237
5234
|
message,
|
|
@@ -5262,9 +5259,6 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
|
|
|
5262
5259
|
if (notifications) {
|
|
5263
5260
|
customMessage = notifications;
|
|
5264
5261
|
}
|
|
5265
|
-
console.log('@@@@@');
|
|
5266
|
-
console.log(error);
|
|
5267
|
-
console.log('@@@@@');
|
|
5268
5262
|
if (!customMessage) {
|
|
5269
5263
|
if (error.error instanceof Blob) {
|
|
5270
5264
|
const blob = new Blob([error.error], {
|
|
@@ -5320,17 +5314,11 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
|
|
|
5320
5314
|
}
|
|
5321
5315
|
handleErrorRefreshToken(error, mkc) {
|
|
5322
5316
|
const hasToRefresh = this.monkeyecxAuthenticationService.refreshShouldHappen(error);
|
|
5323
|
-
console.log('!!!!!!!!!');
|
|
5324
|
-
console.log(error.status);
|
|
5325
|
-
console.log(hasToRefresh);
|
|
5326
5317
|
if ((error.status === 401 || error.status === 400) && hasToRefresh) {
|
|
5327
|
-
console.log('==========1');
|
|
5328
|
-
NgZone.call(this.monkeyecxAuthenticationService.redirectLoginWelcomeBack(), {});
|
|
5329
|
-
console.log('==========2');
|
|
5330
5318
|
setTimeout(() => {
|
|
5331
5319
|
this.handleMessage(error, mkc);
|
|
5332
|
-
},
|
|
5333
|
-
|
|
5320
|
+
}, 1000);
|
|
5321
|
+
NgZone.call(this.monkeyecxAuthenticationService.redirectLoginWelcomeBack(), {});
|
|
5334
5322
|
}
|
|
5335
5323
|
else if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
|
|
5336
5324
|
this.handleMessage(error, mkc);
|