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
FiltersConfigForm issues the default-value queries for a native filter (its search/all-options lookups) against /api/v1/chart/data. It expects 200 (sync result) or 202 (async handoff, handled via waitForAsyncData); any other status throws this error, which the surrounding catch converts into the form's error state.
Source
Thrown at superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:555
if (response.status === 200) {
setNativeFilterFieldValuesWrapper({
defaultValueQueriesData: [result as ChartDataResponseResult],
});
} else if (response.status === 202) {
waitForAsyncData(result as Parameters<typeof waitForAsyncData>[0])
.then((asyncResult: ChartDataResponseResult[]) => {
setNativeFilterFieldValuesWrapper({
defaultValueQueriesData: asyncResult,
});
})
.catch((error: Response) => {
getClientErrorObject(error).then(clientErrorObject => {
setErrorWrapper(clientErrorObject);
});
});
} else {
throw new Error(
`Received unexpected response status (${response.status}) while fetching chart data`,
);
}
} else {
setNativeFilterFieldValuesWrapper({
defaultValueQueriesData: json.result,
});
}
})
.catch((error: Response) => {
getClientErrorObject(error).then(clientErrorObject => {
setError(clientErrorObject);
});
});
},
[
datasetId,
dashboardId,View on GitHub (pinned to f4587218dd)
Solutions
- Test the filter's source chart and default filter expression in Explore/SQL Lab to confirm they execute.
- Re-map the filter to a valid column/chart after datasource schema changes.
- Check browser network tab for the exact status: 401 → re-login; 403 → dataset access; 500 → backend log.
- Simplify the default-value query (remove sorting/search column) to isolate the failing part.
Defensive patterns
Strategy: try-catch
Validate before calling
// before opening the modal, verify the filter's source chart runs
const ok = await SupersetClient.get({ endpoint: `/api/v1/chart/${filter.sliceId}` })
.then(r => r.status === 200).catch(() => false);
if (!ok) setErrorWrapper({ error: t('Source chart unavailable') }); Type guard
function isChartDataResponse(v: unknown): v is { result: unknown[] } {
return !!v && typeof v === 'object' && Array.isArray((v as { result?: unknown }).result);
} Try / catch
.catch((error: Response) => {
getClientErrorObject(error).then(clientErrorObject => {
setErrorWrapper(clientErrorObject); // renders the form-level error state
});
}); Prevention
- After datasource schema changes, re-validate each native filter's column bindings.
- Test default-value queries in Explore before publishing filter changes.
- Handle 401 by redirecting to login instead of leaving the modal stuck.
When it happens
Trigger: Configuring a native filter whose default-value query fails: datasource missing, invalid SQL for value/chart filters, 401/403 on the chart-data endpoint, 500 from the query engine.
Common situations: Filter bound to a chart that was deleted or whose dataset changed columns; default-value query built on a column dropped in a schema migration; permissions changed between opening the modal and saving.
Related errors
- Received unexpected response status (${response.status}) whi
- Received unexpected response status (${response.status}) whi
- clientError.message || clientError.error || t('Sorry, an err
- Export failed: ${response.status} ${response.statusText}
- clientError.message || clientError.error || t('Sorry, an err
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/97345c5be3aeeb8e.
Report an issue: GitHub.