{"record":{"id":"4723a97264b47ac6","repo":"iflytek/astron-agent","slug":"space-queryfailed","errorCode":null,"errorMessage":"space.queryFailed","messagePattern":"space\\.queryFailed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"console/frontend/src/components/space/space-table/index.tsx","lineNumber":178,"sourceCode":"      try {\n        const params: QueryParams = {\n          current: paginationParams?.current || pagination.current,\n          pageSize: paginationParams?.pageSize || pagination.pageSize,\n          ...extraParams,\n        };\n\n        const result = await queryData(params);\n        if (result.success !== false) {\n          setData(result.data);\n          setPagination(prev => ({\n            ...prev,\n            total: result.total,\n            ...(paginationParams || {}),\n          }));\n\n          onSuccess?.(result.data, result.total);\n        } else {\n          throw new Error(t('space.queryFailed'));\n        }\n      } catch (error) {\n        onError?.(error);\n      } finally {\n        setLoading(false);\n      }\n    },\n    [\n      extraParams,\n      queryData,\n      onSuccess,\n      onError,\n      pagination.current,\n      pagination.pageSize,\n      t,\n    ]\n  );\n","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/frontend/src/components/space/space-table/index.tsx#L160-L196","documentation":"The space table loader throws 'space.queryFailed' when the list/query API returns a response that is not successful (result.success falsy), after which onError is invoked. It signals the paged space listing could not be fetched.","triggerScenarios":"fetchSpaces/list API returns success=false (backend error, auth expiry, service unavailable) while the table is loading or paginating.","commonSituations":"Session token expired, tenant/space service down, backend returning an error envelope the table code treats as failure, network proxy errors.","solutions":["Check the browser network tab for the actual API status/error body.","Re-authenticate if the token expired (401/403).","Verify the space backend service is healthy.","Confirm query parameters (pagination/filters) are valid for the API."],"exampleFix":"// before\n} else {\n  throw new Error(t('space.queryFailed'));\n}\n// after\n} else {\n  console.error('space query failed', result);\n  throw new Error(result?.message ?? t('space.queryFailed'));\n}","handlingStrategy":"try-catch","validationCode":"if (!res.ok || !res.data?.success) throw new Error(res.data?.message ?? 'query failed');","typeGuard":null,"tryCatchPattern":"try {\n  await loadSpaces();\n} catch (e) {\n  onError?.(e);\n  message.error(t('space.queryFailed'));\n}","preventionTips":["Surface the backend error message alongside the generic i18n string.","Handle 401 globally with a re-login redirect.","Add retry with backoff for transient query failures."],"tags":["frontend","react","api","query"],"backgroundTag":"http-error-response","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}