apache/superset · error · DashboardInvalidError
Dashboard parameters are invalid.
Error message
Dashboard parameters are invalid.
What it means
DashboardInvalidError is raised by CopyDashboardCommand.validate() when the copy properties dict lacks a truthy 'dashboard_title' or lacks 'json_metadata'. Both are mandatory inputs for creating a clone, since the copy is created via DashboardDAO.copy_dashboard with those properties.
Source
Thrown at superset/commands/dashboard/copy.py:62
# session. The change-record listener stamps
# ``version_transaction.action_kind = 'clone'`` so the new
# dashboard's baseline records read as "Cloned from <source>"
# in the timeline instead of "Dashboard created".
# Method-scoped imports — defer the versioning bootstrap path
# (``Model.metadata`` and Continuum-adjacent setup) out of this
# command's module-load graph; see ``changes.py`` module
# docstring for the broader init-order rationale.
from superset import db
from superset.versioning.changes import ACTION_KIND_CLONE, ACTION_KIND_KEY
db.session.info[ACTION_KIND_KEY] = ACTION_KIND_CLONE
return DashboardDAO.copy_dashboard(self._original_dash, self._properties)
def validate(self) -> None:
if not self._properties.get("dashboard_title") or not self._properties.get(
"json_metadata"
):
raise DashboardInvalidError()
if not security_manager.is_editor(self._original_dash):
raise DashboardForbiddenError()
View on GitHub (pinned to f4587218dd)
Solutions
- Include both 'dashboard_title' (non-empty) and 'json_metadata' in the copy request payload.
- If copying programmatically, seed the payload from the source dashboard: {'dashboard_title': src.dashboard_title + ' (copy)', 'json_metadata': src.json_metadata or '{}'}).
- Validate the payload against the copy request schema before sending.
Example fix
# before
props = {'dashboard_title': 'Sales copy'} # json_metadata missing
CopyDashboardCommand(dash, props).run()
# after
props = {
'dashboard_title': 'Sales copy',
'json_metadata': dash.json_metadata or '{}',
}
CopyDashboardCommand(dash, props).run() Defensive patterns
Strategy: validation
Validate before calling
props = {
'dashboard_title': src.dashboard_title + ' (copy)' or 'Copied dashboard',
'json_metadata': src.json_metadata or '{}',
}
assert props['dashboard_title'] and props['json_metadata'] Try / catch
try:
CopyDashboardCommand(src, props).run()
except DashboardInvalidError as ex:
# inspect ex.exceptions for the per-field reason
report_validation(ex.exceptions) Prevention
- Always seed copy payloads from the source dashboard's own fields.
- Default json_metadata to '{}' when the source has none.
- Add a payload schema check in API clients before the request.
When it happens
Trigger: Calling the dashboard copy endpoint (POST /api/v1/dashboard/<id>/copy or the SupersetClient dashboard copy) with a payload missing dashboard_title or json_metadata, or with dashboard_title set to an empty string.
Common situations: Custom scripts building the copy payload manually and forgetting json_metadata; frontend code that copies a dashboard whose source json_metadata was null; API clients modeled on outdated payload schemas.
Related errors
- Dashboard %(dashboard_id)s not found
- Changing this Dashboard is forbidden
- Dashboard parameters are invalid.
- Dashboard parameters are invalid.
- created_by_fk_or_editor only supports 'eq'; got '{c.opr}'
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/a4edca31d2742fff.
Report an issue: GitHub.