🐛 fix(config): Bugs

This commit is contained in:
web@ppanel
2024-12-15 23:18:50 +07:00
parent bbc2da05f0
commit f57e40cd3d
12 changed files with 100 additions and 16 deletions
+1 -2
View File
@@ -7,10 +7,9 @@ import { getAuthorization, Logout } from './common';
async function handleError(response: any) {
const code = response.data?.code;
if ([40002, 40003, 40004].includes(code)) return Logout();
if (response?.config?.skipErrorHandler) return;
if (!isBrowser()) return;
if ([40002, 40003, 40004].includes(code)) return Logout();
const t = await getTranslations('common');
const message =
t(`request.${code}`) !== `request.${code}`