Dashboard Screenshot API Endpooint Gives and Error Message when a Dashboard is Empty or has no Charts #30736
Closed
2 of 3 tasks
Labels
api:dashboard
Related to the REST endpoints of the Dashboard
dashboard:error
Related to Dashboard errors
preset:bounty:bug
Bugs that have been selected by Preset and have a bounty attached.
preset:bounty
Issues that have been selected by Preset and have a bounty attached.
Bug description
When a dashboard is empty OR has only text elements, when the user tries to send an API call to generate a screenshot, they get an error message instead of a screenshot
Repro steps:
Use POST endpoint
/api/v1/dashboard/{{DashboardID}}/cache_dashboard_screenshot/
By default, an empty array can be used as the request body to get the dashboard screenshot. Alternatively, it's possible to include below fields in the body:
The request returns an image_url value, that can be used to download the dashboard. It's also possible to append ?download_format=pdf to download a PDF as opposed to an image.
Expected results
A blank or text-only dashboard image/PDF will be generated.
Actual results
{"message":"Not found"} error was shown.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: