aminghadersohi opened a new pull request, #38254: URL: https://github.com/apache/superset/pull/38254
### SUMMARY The MCP tool functions (`generate_chart`, `get_chart_data`, `get_chart_preview`) are the outermost boundary for MCP requests. If an unexpected exception escapes these handlers, the MCP client receives an unhandled crash instead of a structured error response. This changes the outermost `except` clause in each tool function from a specific exception tuple to `except Exception`, ensuring all errors are caught and returned as clean error responses. Inner/utility handlers continue to catch specific exception types for proper error categorization. Follow-up to #37185. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - no UI changes ### TESTING INSTRUCTIONS 1. All 624 MCP service unit tests pass 2. Verify that unexpected exceptions in tool functions return structured error responses instead of crashing ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
