apache/superset · error
Received unexpected response status (${response.status}) whi
Error message
Received unexpected response status (${response.status}) while fetching chart data What it means
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.
Source
Thrown at superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx:308
if (response.status === 200) {
setState([result as ChartDataResponseResult]);
setError(undefined);
handleFilterLoadFinish();
} else if (response.status === 202) {
waitForAsyncData(result as Parameters<typeof waitForAsyncData>[0])
.then((asyncResult: ChartDataResponseResult[]) => {
setState(asyncResult);
setError(undefined);
handleFilterLoadFinish();
})
.catch((error: Response) => {
getClientErrorObject(error).then(clientErrorObject => {
setError(clientErrorObject);
handleFilterLoadFinish();
});
});
} else {
throw new Error(
`Received unexpected response status (${response.status}) while fetching chart data`,
);
}
} else {
setState(json.result as ChartDataResponseResult[]);
setError(undefined);
handleFilterLoadFinish();
}
})
.catch((error: Response) => {
getClientErrorObject(error).then(clientErrorObject => {
setError(clientErrorObject);
handleFilterLoadFinish();
});
});
}
}, [
inViewFirstTime,View on GitHub (pinned to f4587218dd)
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).
Defensive patterns
Strategy: try-catch
Validate before calling
import SupersetClient from '@superset-ui/core';
const probe = await SupersetClient.get({ endpoint: `/api/v1/chart/${filter.chartId}` });
// non-2xx probe means the filter's source chart is unavailable; surface config error before loading values Type guard
function isClientErrorObject(v: unknown): v is { error: string } {
return !!v && typeof v === 'object' && typeof (v as { error?: unknown }).error === 'string';
} Try / catch
.catch((error: Response) => {
getClientErrorObject(error).then(clientErrorObject => {
setError(clientErrorObject); // shown inside the filter control
handleFilterLoadFinish(); // always reset loading state
});
}); Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Received unexpected response status (${response.status}) whi
- Received unexpected response status (${response.status}) whi
- Dashboard not found
- clientError.message || clientError.error || t('Sorry, an err
- Export failed: ${response.status} ${response.statusText}
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/ae4f8388859f761b.
Report an issue: GitHub.