yousoph opened a new issue, #30736:
URL: https://github.com/apache/superset/issues/30736
### 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:
1. Create a dashboard with just a title and save it OR create a dashboard
with some text elements only and save it
2. Find the dashboard ID of the dashboard
3. Use the API to try to generate a screenshot for the dashboard
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:
- dataMask (array): Specifies the dataMask configuration (controls
applied filters).
- activeTabs (list): Specify the tab(s) that should be included/selected.
- urlParams (list): List of URL params to be applied to the dashboard.
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
- [X] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [X] 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]