fix: ignore request errors on setup
This commit is contained in:
+6
-1
@@ -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
|
||||
);
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user