apache/superset · error · DashboardDeleteFailedReportsExistError
There are associated alerts or reports: %(report_names)s
Error message
There are associated alerts or reports: %(report_names)s
What it means
DashboardDeleteFailedReportsExistError is raised by DeleteDashboardCommand.validate() when ReportScheduleDAO.find_by_dashboard_ids() returns any alert or report schedule targeting the dashboards being deleted. Superset blocks the delete because orphaned report schedules would silently stop firing or break. The message lists the offending report names via the %(report_names)s interpolation.
Source
Thrown at superset/commands/dashboard/delete.py:76
def __init__(self, model_ids: list[int]):
self._model_ids = model_ids
self._models: Optional[list[Dashboard]] = None
@transaction(on_error=partial(on_error, reraise=DashboardDeleteFailedError))
def run(self) -> None:
self.validate()
assert self._models
DashboardDAO.delete(self._models)
def validate(self) -> None:
# Validate/populate model exists
self._models = DashboardDAO.find_by_ids(self._model_ids)
if not self._models or len(self._models) != len(self._model_ids):
raise DashboardNotFoundError()
# Check there are no associated ReportSchedules
if reports := ReportScheduleDAO.find_by_dashboard_ids(self._model_ids):
report_names = [report.name for report in reports]
raise DashboardDeleteFailedReportsExistError(
_(
"There are associated alerts or reports: %(report_names)s",
report_names=",".join(report_names),
)
)
# Check editorship
for model in self._models:
try:
security_manager.raise_for_editorship(model)
except SupersetSecurityException as ex:
raise DashboardForbiddenError() from ex
View on GitHub (pinned to f4587218dd)
Solutions
- Open Alerts & Reports, delete or re-target the schedules named in the error message, then retry the dashboard delete.
- Programmatically: ReportScheduleDAO.find_by_dashboard_ids(ids) first, and delete those schedules with ReportScheduleCommand/DAO before the dashboard delete.
- If the report should keep working, point it at a replacement dashboard instead of deleting it.
Example fix
# before
DeleteDashboardCommand([10]).run() # fails: report 'Daily Sales' attached
# after
reports = ReportScheduleDAO.find_by_dashboard_ids([10])
for r in reports:
ReportScheduleDAO.delete([r])
DeleteDashboardCommand([10]).run() Defensive patterns
Strategy: validation
Validate before calling
from superset.daos.report import ReportScheduleDAO
blocking = ReportScheduleDAO.find_by_dashboard_ids(ids)
if blocking:
raise DependencyError(
'delete or re-target these schedules first: '
+ ', '.join(r.name for r in blocking)
) Try / catch
try:
DeleteDashboardCommand(ids).run()
except DashboardDeleteFailedReportsExistError as ex:
# ex.message contains the report names; prompt user to re-target them
show_report_dependency_dialog(ex) Prevention
- Audit Alerts & Reports before deleting dashboards.
- In cleanup scripts, resolve dependent schedules first (delete or re-point).
- Keep an ownership map of report -> dashboard for ops runbooks.
When it happens
Trigger: DELETE /api/v1/dashboard/ for a dashboard referenced by one or more Alert/Report schedules (ReportSchedule rows whose dashboard_id is in the delete list).
Common situations: Deleting a dashboard that a weekly report email or alert monitors; cleaning up old dashboards without auditing the Alerts & Reports page; CI environments with seeded alerts blocking cleanup scripts.
Related errors
- There are associated alerts or reports: %(report_names)s
- There are associated alerts or reports: %(report_names)s
- Changing this Dashboard is forbidden
- Dashboard not found.
- Cannot delete a database that has datasets attached
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/972f868b3b5a0660.
Report an issue: GitHub.