feat: license error tip

This commit is contained in:
Tristan Yang
2022-12-12 17:52:22 +08:00
parent 0e0dec9c9e
commit 6cc7bc466b
2 changed files with 13 additions and 2 deletions
+11
View File
@@ -102,6 +102,17 @@ const baseQueryWithTokenCheck = async (args, api, extraOptions) => {
} }
} }
break; break;
case 451:
{
// 证书错误
if (api.endpoint !== "login") {
// 退出登录
api.dispatch(resetAuthData());
location.href = "/#/login";
}
toast.error(result.error.data || "License Error");
}
break;
case 500: case 500:
case 503: case 503:
{ {
+2 -2
View File
@@ -74,8 +74,8 @@ export default function LoginPage() {
"No associated account found, please contact user admin for an invitation link to join." "No associated account found, please contact user admin for an invitation link to join."
); );
break; break;
case 451: // 451有解析错误,暂时先客户端处理
toast.error("License error: Domain incorrect!"); case "PARSING_ERROR":
break; break;
default: default:
toast.error("Something Error"); toast.error("Something Error");