mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-15 12:51:11 -05:00
🐛 fix(request): Add error code 40005 to trigger logout
This commit is contained in:
parent
d0e6df044e
commit
71bf002370
@ -7,7 +7,7 @@ import { getAuthorization, Logout } from './common';
|
|||||||
|
|
||||||
async function handleError(response: any) {
|
async function handleError(response: any) {
|
||||||
const code = response.data?.code;
|
const code = response.data?.code;
|
||||||
if ([40002, 40003, 40004].includes(code)) return Logout();
|
if ([40002, 40003, 40004, 40005].includes(code)) return Logout();
|
||||||
if (response?.config?.skipErrorHandler) return;
|
if (response?.config?.skipErrorHandler) return;
|
||||||
if (!isBrowser()) return;
|
if (!isBrowser()) return;
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { getAuthorization, Logout } from './common';
|
|||||||
|
|
||||||
async function handleError(response: any) {
|
async function handleError(response: any) {
|
||||||
const code = response.data?.code;
|
const code = response.data?.code;
|
||||||
if ([40002, 40003, 40004].includes(code)) return Logout();
|
if ([40002, 40003, 40004, 40005].includes(code)) return Logout();
|
||||||
if (response?.config?.skipErrorHandler) return;
|
if (response?.config?.skipErrorHandler) return;
|
||||||
if (!isBrowser()) return;
|
if (!isBrowser()) return;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user