{"record":{"id":"ae4f8388859f761b","repo":"apache/superset","slug":"received-unexpected-response-status-response-st-ae4f83","errorCode":null,"errorMessage":"Received unexpected response status (${response.status}) while fetching chart data","messagePattern":"Received unexpected response status \\((.+?)\\) while fetching chart data","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx","lineNumber":308,"sourceCode":"            if (response.status === 200) {\n              setState([result as ChartDataResponseResult]);\n              setError(undefined);\n              handleFilterLoadFinish();\n            } else if (response.status === 202) {\n              waitForAsyncData(result as Parameters<typeof waitForAsyncData>[0])\n                .then((asyncResult: ChartDataResponseResult[]) => {\n                  setState(asyncResult);\n                  setError(undefined);\n                  handleFilterLoadFinish();\n                })\n                .catch((error: Response) => {\n                  getClientErrorObject(error).then(clientErrorObject => {\n                    setError(clientErrorObject);\n                    handleFilterLoadFinish();\n                  });\n                });\n            } else {\n              throw new Error(\n                `Received unexpected response status (${response.status}) while fetching chart data`,\n              );\n            }\n          } else {\n            setState(json.result as ChartDataResponseResult[]);\n            setError(undefined);\n            handleFilterLoadFinish();\n          }\n        })\n        .catch((error: Response) => {\n          getClientErrorObject(error).then(clientErrorObject => {\n            setError(clientErrorObject);\n            handleFilterLoadFinish();\n          });\n        });\n    }\n  }, [\n    inViewFirstTime,","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx#L290-L326","documentation":"FilterValue (native filter bar) fetches the filter's backing chart data from /api/v1/chart/{id}/data. A 202 status means the async-query job handoff, which this code path handles; any other unexpected HTTP status falls through to this throw, and the outer catch converts it to a client error object shown in the filter control.","triggerScenarios":"The chart-data endpoint returns 4xx/5xx/3xx for the filter's source chart: chart deleted, dataset permission revoked, malformed query, gateway 502/504, session expired (401).","commonSituations":"Filter references a deleted chart or dataset; logged-in user lost access to the filter's datasource; reverse proxy timeouts on slow filter queries; backend exception in the query executor.","solutions":["Open the filter's source chart in Explore and confirm it runs without error.","Check the user still has access to the underlying dataset (403) and is logged in (401).","Inspect the Superset backend log for the matching request to find the real error body.","For gateway 502/504: raise proxy timeouts or optimize the filter query (limits, indexes)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import SupersetClient from '@superset-ui/core';\n\nconst probe = await SupersetClient.get({ endpoint: `/api/v1/chart/${filter.chartId}` });\n// non-2xx probe means the filter's source chart is unavailable; surface config error before loading values","typeGuard":"function isClientErrorObject(v: unknown): v is { error: string } {\n  return !!v && typeof v === 'object' && typeof (v as { error?: unknown }).error === 'string';\n}","tryCatchPattern":".catch((error: Response) => {\n  getClientErrorObject(error).then(clientErrorObject => {\n    setError(clientErrorObject);       // shown inside the filter control\n    handleFilterLoadFinish();          // always reset loading state\n  });\n});","preventionTips":["Keep native filters bound to charts/datasets the viewer role can access.","Monitor the chart-data endpoint for 4xx/5xx spikes; fix backend errors promptly.","Set sane proxy timeouts so filter queries do not surface as gateway errors."],"tags":["native-filters","network","chart-data","dashboard"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}