chore(mcp): Standardize error response shapes across chart tools#39905
chore(mcp): Standardize error response shapes across chart tools#39905alexandrusoare wants to merge 1 commit intomasterfrom
Conversation
Code Review Agent Run #742d19Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #39905 +/- ##
==========================================
- Coverage 64.37% 63.88% -0.49%
==========================================
Files 2569 2583 +14
Lines 134745 136671 +1926
Branches 31278 31513 +235
==========================================
+ Hits 86737 87316 +579
- Misses 46510 47839 +1329
- Partials 1498 1516 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
SUMMARY
Chart tools return two different error shapes —
ChartErrorhas anerrorfield whileChartGenerationErrorusesmessage. Clients need to check different field names just to read the error message depending on which tool they called.This PR introduces
MCPBaseErroras a shared base class. BothChartErrorandChartGenerationErrornow inherit from it, so every chart error response includes botherrorandmessagefields (same value), plus consistent optional fields likedetailsandsuggestions.Existing code is fully backward compatible — no call sites were changed.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION