-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Bug description
π Description
When downloading charts with large datasets in Apache Superset, the browser opens the endpoint:
/api/v1/chart/data
If the request payload exceeds size limits (commonly resulting in HTTP 413 β Request Entity Too Large), Superset returns a raw JSON error response directly in the browser.
This results in a poor user experience, as end users are exposed to low-level backend error messages instead of a meaningful, user-friendly message or UI feedback.
π Current Behavior
When the chart download payload is too large, the browser displays:
{
"errors": [
{
"message": "413 Request Entity Too Large: The data value transmitted exceeds the capacity limit.",
"error_type": "GENERIC_BACKEND_ERROR",
"level": "error",
"extra": {
"issue_codes": [
{
"code": 1011,
"message": "Issue 1011 - Superset encountered an unexpected error."
}
]
}
}
]
}
This raw JSON response is shown directly to the user in the browser.
β Expected Behavior
One of the following (in order of preference):
A Superset UI error page or modal explaining that:
The chart data is too large to download
The user should apply filters, reduce date range, or aggregate data
OR
A configurable way to override the default error message (for example, via superset_config.py) to show a custom message instead of raw JSON
OR
Graceful handling in the frontend for HTTP 413 responses from /api/v1/chart/data, displaying a friendly message instead of opening a raw API response in the browser
π― Why this matters
This scenario is very common in production dashboards with:
Large tables
Forecast charts
High-cardinality dimensions
Most enterprise deployments place Superset behind:
Nginx
Apache
AWS ALB (which enforces strict body-size limits)
In these setups, HTTP 413 errors often occur before Flask can handle them, making Superset-level customization impossible
As a result, every production deployment must rely on reverse-proxy hacks (custom Nginx error_page) to achieve acceptable UX.
π Suggested Improvements (Design Ideas)
Frontend interception of 413 responses from /api/v1/chart/data
A dedicated Superset error view for oversized queries
Configurable user-facing error messages for payload-size errors
Optional redirect back to the dashboard instead of opening raw API output
π Steps to Reproduce
Create a chart with:
Large date range
High row count (no aggregation)
Click Download β CSV / Excel
Superset opens /api/v1/chart/data in a new tab
Backend or proxy returns 413 Request Entity Too Large
Browser shows raw JSON error
π§ͺ Environment
Apache Superset: 5.0.0
Deployment: Production
Reverse proxy: Nginx / AWS ALB
Browser: Chrome
OS: Linux
Database: (Any β not DB specific)
π Additional Context
This issue cannot be solved using superset_config.py alone in most real-world deployments because the request is rejected before reaching Flask.
A Superset-native solution would significantly improve UX and reduce the need for proxy-level workarounds.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.