fix: ignore request errors on setup

This commit is contained in:
jialin
2026-06-06 14:29:49 +08:00
committed by jialin
parent 6350f7f11a
commit 4a86b71018
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -52,7 +52,12 @@ const checkDefaultPage = async (userInfo: any) => {
const HAS_K8S_CLUSTER_KEY = 'hasKubernetesCluster';
const probeHasKubernetesCluster = async (): Promise<boolean | undefined> => {
try {
const res = await queryClusterList({ page: -1 });
const res = await queryClusterList(
{ page: -1 },
{
skipErrorHandler: true
}
);
const value = (res?.items ?? []).some(
(c) => c?.provider === ProviderValueMap.Kubernetes
);
+1
View File
@@ -3,6 +3,7 @@ import { request } from '@umijs/max';
export async function queryCurrentUserState(opts?: Record<string, any>) {
return request<Global.UserInfo>(`/users/me`, {
method: 'GET',
skipErrorHandler: true,
...opts
});
}