diff --git a/src/app.tsx b/src/app.tsx index abd7a1b7..452bde5f 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -52,7 +52,12 @@ const checkDefaultPage = async (userInfo: any) => { const HAS_K8S_CLUSTER_KEY = 'hasKubernetesCluster'; const probeHasKubernetesCluster = async (): Promise => { 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 ); diff --git a/src/services/profile/apis.ts b/src/services/profile/apis.ts index c3678708..798330e1 100644 --- a/src/services/profile/apis.ts +++ b/src/services/profile/apis.ts @@ -3,6 +3,7 @@ import { request } from '@umijs/max'; export async function queryCurrentUserState(opts?: Record) { return request(`/users/me`, { method: 'GET', + skipErrorHandler: true, ...opts }); }