Files
superset2/tests
Amin Ghadersohi d8e1d7e6fd fix(mcp): catch KeyError from set_dash_metadata in duplicate_dashboard
``set_dash_metadata`` can raise ``KeyError`` when a position layout node
is missing expected keys (e.g. ``node['meta']['chartId']`` on a malformed
CHART entry). Add ``KeyError`` to the ``(ValueError, TypeError)`` handler
so a corrupted source layout produces a structured error response instead
of an unhandled exception. Also add ``dashboard_id`` to the ctx.error
log message in this handler for consistency with all other error branches.
Add regression test ``test_key_error_in_copy_command_returns_structured_error``.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 17:23:47 +00:00
..