fix: no need to show error in login for first

This commit is contained in:
jialin
2026-06-05 16:24:46 +08:00
committed by jialin
parent f2bff0d1fb
commit 46f859cc3c
7 changed files with 50 additions and 22 deletions
+2 -1
View File
@@ -113,7 +113,8 @@ export async function queryClusterList(
return request<Global.PageResponse<ClusterListItem>>(`${CLUSTERS_API}`, {
method: 'GET',
params,
cancelToken: options?.token
cancelToken: options?.token,
skipErrorHandler: options?.skipErrorHandler
});
}
@@ -19,7 +19,12 @@ export default function useClusterList() {
const fetchClusterList = async () => {
try {
const res = await queryClusterList({ page: -1 });
const res = await queryClusterList(
{ page: -1 },
{
skipErrorHandler: true
}
);
const list = res?.items?.map((item: any) => ({
label: item.name,
value: item.id,
@@ -35,7 +40,12 @@ export default function useClusterList() {
const fetchWorkerList = async () => {
try {
const res = await queryWorkersList({ page: -1 });
const res = await queryWorkersList(
{ page: -1 },
{
skipErrorHandler: true
}
);
const list = res?.items?.map((item: any) => ({
cluster_id: item.cluster_id,
state: item.state,