Dr-Aniket opened a new issue, #36887:
URL: https://github.com/apache/superset/issues/36887

   ### 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to