apache/superset · error · DashboardNotFoundError
Dashboard not found.
Error message
Dashboard not found.
What it means
DashboardNotFoundError raised in DashboardUpdateCommand.validate (update.py:114) when DashboardDAO.find_by_id(self._model_id) returns nothing — the dashboard id being updated does not exist (anymore) in the metadata DB.
Source
Thrown at superset/commands/dashboard/update.py:114
self._model,
{k: v for k, v in self._properties.items() if k != "json_metadata"},
)
if json_metadata:
DashboardDAO.set_dash_metadata(
dashboard,
data=json.loads(json_metadata),
)
return dashboard
def validate(self) -> None:
exceptions: list[ValidationError] = []
slug: Optional[str] = self._properties.get("slug")
tag_ids: Optional[list[int]] = self._properties.get("tags")
# Validate/populate model exists
self._model = DashboardDAO.find_by_id(self._model_id)
if not self._model:
raise DashboardNotFoundError()
# Check editorship
try:
security_manager.raise_for_editorship(self._model)
except SupersetSecurityException as ex:
raise DashboardForbiddenError() from ex
# Validate slug uniqueness
if not DashboardDAO.validate_update_slug_uniqueness(self._model_id, slug):
exceptions.append(DashboardSlugExistsValidationError())
compute_subjects(self._model, self._properties, exceptions)
# validate tags
try:
validate_tags(ObjectType.dashboard, self._model.tags, tag_ids)
except ValidationError as ex:
exceptions.append(ex)
View on GitHub (pinned to f4587218dd)
Solutions
- Verify the dashboard exists: GET /api/v1/dashboard/<id> (or filter by title: GET /api/v1/dashboard/?q=...).
- If it was deleted, restore it from trash (POST /api/v1/dashboard/<id>/restore) or recreate it.
- If ids came from an export/import, re-resolve ids in the target environment instead of reusing source-environment ids.
- Handle 404 in the client and refresh the dashboard list shown to the user.
Defensive patterns
Strategy: validation
Validate before calling
from superset.daos.dashboard import DashboardDAO
def dashboard_exists(model_id: int) -> bool:
return DashboardDAO.find_by_id(model_id) is not None Try / catch
from superset.commands.dashboard.exceptions import DashboardNotFoundError
try:
UpdateDashboardCommand(model_id, properties).run()
except DashboardNotFoundError:
return ApiResponse.not_found() # refresh client state; dashboard is gone Prevention
- GET-verify the dashboard id right before updating in scripts.
- Handle 404 in editors: another user may have deleted the dashboard since it was opened.
- Do not reuse dashboard ids across environments after export/import.
When it happens
Trigger: PUT /api/v1/dashboard/<id> where <id> was hard-deleted, never existed, or belongs to a different environment; also hit when a client holds a stale id after a workspace re-import.
Common situations: Two editors with the same dashboard open, one deletes it while the other saves; automated scripts using cached ids across environment rebuilds; typo'd or truncated id in a curl/script call.
Related errors
- Dashboard %(dashboard_id)s not found
- Annotation not found.
- Annotation layer not found.
- Annotation layer not found.
- Chart not found.
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/267e01fdcc36d817.
Report an issue: GitHub.