{"record":{"id":"01f435c26f7abd6f","repo":"apache/superset","slug":"failed-to-load-chart-data","errorCode":null,"errorMessage":"Failed to load chart data","messagePattern":"Failed to load chart data","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"superset-frontend/src/pages/Chart/index.tsx","lineNumber":88,"sourceCode":"      return rv;\n    }\n    // Since there's no dataset id but the API responded with a valid payload,\n    // we assume the dataset was deleted, so we preserve some values from previous\n    // state so if the user decide to swap the datasource, the chart config remains\n    fallbackExploreInitialData.form_data = {\n      ...rv.result.form_data,\n      ...fallbackExploreInitialData.form_data,\n    };\n    if (rv.result?.slice) {\n      fallbackExploreInitialData.slice = rv.result.slice;\n    }\n  }\n  let message = t('Failed to load chart data');\n  const responseError = rv?.result?.message;\n  if (responseError) {\n    message = `${message}:\\n${responseError}`;\n  }\n  throw new Error(message);\n};\n\nconst getDashboardPageContext = (pageId?: string | null) => {\n  if (!pageId) {\n    return null;\n  }\n  return getItem(LocalStorageKeys.DashboardExploreContext, {})[pageId] || null;\n};\n\nconst getDashboardContextFormData = (search: string) => {\n  const dashboardPageId = getUrlParam(URL_PARAMS.dashboardPageId, search);\n  const dashboardContext = getDashboardPageContext(dashboardPageId);\n  if (dashboardContext) {\n    const sliceId = getUrlParam(URL_PARAMS.sliceId, search) || 0;\n    const {\n      colorScheme,\n      labelsColor,\n      labelsColorMap,","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset-frontend/src/pages/Chart/index.tsx#L70-L106","documentation":"The standalone chart page bootstrap: when the page is loaded without server-rendered bootstrap data, it fetches the chart via getChartDataAndParams; on failure it throws 'Failed to load chart data' (appending the backend's message when present). This is the top-level 'the chart could not be loaded at all' error for direct chart/permmalink navigation.","triggerScenarios":"Navigating directly to /chart/{id} (or a permalink) when the fetch of chart data fails: chart id nonexistent, no permission (403/404), backend 500, or the async data message contains an error; also when result and message are both absent.","commonSituations":"User opens a chart link they cannot access; chart deleted; backend exception in chart load; network/proxy failure; session expired mid-navigation.","solutions":["Confirm the chart id exists and the current user can view it (GET /api/v1/chart/{id}).","Check the appended backend message — it usually carries the root cause (e.g. dataset error).","Review the backend log for the failing /chart/data or chart GET request.","Re-login if the session expired, then reload the page."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"import SupersetClient from '@superset-ui/core';\n\nasync function chartIsReadable(chartId: number): Promise<boolean> {\n  try {\n    const r = await SupersetClient.get({ endpoint: `/api/v1/chart/${chartId}` });\n    return r.status === 200;\n  } catch {\n    return false;\n  }\n}","typeGuard":"function hasBackendMessage(rv: unknown): rv is { result: { message?: string } } {\n  return !!rv && typeof rv === 'object' && !!(rv as { result?: unknown }).result;\n}","tryCatchPattern":"// keep a cached/permalink fallback and show the backend message verbatim\ntry {\n  bootstrapData = await getChartDataAndParams(chartId);\n} catch (e) {\n  showErrorPage((e as Error).message); // 'Failed to load chart data: <backend msg>'\n}","preventionTips":["Verify chart ids and user access before generating shareable chart links.","Include the backend message when reporting this error — it names the root cause.","Keep backend logs correlated by request id so chart-load failures are traceable."],"tags":["chart-page","bootstrap","network","permissions"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}