bito-code-review[bot] commented on code in PR #37185:
URL: https://github.com/apache/superset/pull/37185#discussion_r2853666370
##########
superset/mcp_service/chart/chart_utils.py:
##########
@@ -92,8 +202,9 @@ def generate_explore_link(dataset_id: int | str, form_data:
Dict[str, Any]) -> s
# Return URL with just the form_data_key
return f"{base_url}/explore/?form_data_key={form_data_key}"
- except Exception:
+ except (CommandException, KeyError, ValueError) as e:
Review Comment:
<!-- Bito Reply -->
This change adds `SupersetException`, `SQLAlchemyError`, `AttributeError`,
and `TypeError` to the catch clause in `generate_explore_link` (and similar
functions), ensuring a fallback URL is always returned on these errors. It
improves robustness by preventing uncaught exceptions from propagating,
addressing potential failures in URL generation.
--
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]