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