monkey-front-core 0.0.371 → 0.0.373
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/interceptors/monkeyecx-http-config-error.interceptor.mjs +1 -10
- package/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +3 -2
- package/fesm2015/monkey-front-core.mjs +2 -10
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +2 -10
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/monkey-front-core-0.0.373.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.371.tgz +0 -0
|
@@ -4434,7 +4434,8 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
|
|
|
4434
4434
|
}, timeout);
|
|
4435
4435
|
}
|
|
4436
4436
|
handleErrorRefreshToken(error, mkc) {
|
|
4437
|
-
|
|
4437
|
+
const hasToRefresh = this.monkeyecxAuthenticationService.refreshShouldHappen(error);
|
|
4438
|
+
if ((error.status === 401 || error.status === 400) && hasToRefresh) {
|
|
4438
4439
|
NgZone.call(this.monkeyecxAuthenticationService.redirectLoginWelcomeBack(), {});
|
|
4439
4440
|
}
|
|
4440
4441
|
else if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
|
|
@@ -5369,23 +5370,14 @@ class MonkeyEcxHttpConfigErrorInterceptor {
|
|
|
5369
5370
|
// no to do
|
|
5370
5371
|
}
|
|
5371
5372
|
async handle(request, error) {
|
|
5372
|
-
console.log('===@');
|
|
5373
|
-
console.log('error1');
|
|
5374
5373
|
try {
|
|
5375
|
-
console.log('error2');
|
|
5376
5374
|
if (this.monkeyecxAuthenticationService.refreshShouldHappen(error)) {
|
|
5377
|
-
console.log('error3');
|
|
5378
5375
|
await this.monkeyecxAuthenticationService?.refreshToken();
|
|
5379
|
-
console.log('error4');
|
|
5380
5376
|
const headers = await this.monkeyecxAuthenticationService.getRequestWithHeadersAsync(request);
|
|
5381
|
-
console.log('error5');
|
|
5382
|
-
console.log(headers);
|
|
5383
5377
|
return headers;
|
|
5384
5378
|
}
|
|
5385
5379
|
}
|
|
5386
5380
|
catch (e) {
|
|
5387
|
-
console.log('error6');
|
|
5388
|
-
console.log(e);
|
|
5389
5381
|
return throwError(e);
|
|
5390
5382
|
}
|
|
5391
5383
|
return null;
|