超时异常 不需要移除Toekn的
This commit is contained in:
parent
4ab65051f4
commit
e2307713a3
|
|
@ -1,5 +1,5 @@
|
|||
import { Feature } from 'oak-frontend-base/es/types/Feature';
|
||||
import { OakUnloggedInException, OakNetworkException, OakServerProxyException, OakPreConditionUnsetException, } from 'oak-domain/lib/types/Exception';
|
||||
import { OakUnloggedInException, OakNetworkException, OakServerProxyException, OakPreConditionUnsetException, OakRequestTimeoutException, } from 'oak-domain/lib/types/Exception';
|
||||
import { tokenProjection } from '../types/Projection';
|
||||
import { OakUserInfoLoadingException } from '../types/Exception';
|
||||
import { LOCAL_STORAGE_KEYS } from '../config/constants';
|
||||
|
|
@ -61,7 +61,8 @@ export class Token extends Feature {
|
|||
// refresh出了任何错都无视(排除网络异常),直接放弃此token
|
||||
console.warn(err);
|
||||
if (err instanceof OakNetworkException ||
|
||||
err instanceof OakServerProxyException) {
|
||||
err instanceof OakServerProxyException ||
|
||||
err instanceof OakRequestTimeoutException) {
|
||||
return;
|
||||
}
|
||||
this.removeToken(true);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ class Token extends Feature_1.Feature {
|
|||
// refresh出了任何错都无视(排除网络异常),直接放弃此token
|
||||
console.warn(err);
|
||||
if (err instanceof Exception_1.OakNetworkException ||
|
||||
err instanceof Exception_1.OakServerProxyException) {
|
||||
err instanceof Exception_1.OakServerProxyException ||
|
||||
err instanceof Exception_1.OakRequestTimeoutException) {
|
||||
return;
|
||||
}
|
||||
this.removeToken(true);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import {
|
|||
OakNetworkException,
|
||||
OakServerProxyException,
|
||||
OakPreConditionUnsetException,
|
||||
OakRequestTimeoutException,
|
||||
} from 'oak-domain/lib/types/Exception';
|
||||
import { Cache } from 'oak-frontend-base/es/features/cache';
|
||||
import { LocalStorage } from 'oak-frontend-base/es/features/localStorage';
|
||||
|
|
@ -88,7 +89,8 @@ export class Token<ED extends EntityDict> extends Feature {
|
|||
console.warn(err);
|
||||
if (
|
||||
err instanceof OakNetworkException ||
|
||||
err instanceof OakServerProxyException
|
||||
err instanceof OakServerProxyException ||
|
||||
err instanceof OakRequestTimeoutException
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue