mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix(user): simplify error handling by skipping notification for empty token
This commit is contained in:
parent
0a54efc7d9
commit
1ce5ea0fe1
@ -44,13 +44,7 @@ export const CurrentUserProvider = (props) => {
|
||||
api
|
||||
.request({
|
||||
url: '/auth:check',
|
||||
skipNotify: (error) => {
|
||||
const errs = api.toErrMessages(error);
|
||||
if (errs.find((error: { code?: string }) => error.code === 'EMPTY_TOKEN')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
skipNotify: true,
|
||||
skipAuth: true,
|
||||
})
|
||||
.then((res) => res?.data),
|
||||
|
Loading…
x
Reference in New Issue
Block a user