aminghadersohi commented on code in PR #38890:
URL: https://github.com/apache/superset/pull/38890#discussion_r3006174065
##########
superset/mcp_service/chart/tool/generate_chart.py:
##########
@@ -807,6 +807,9 @@ async def generate_chart( # noqa: C901
return GenerateChartResponse.model_validate(result)
except (CommandException, SQLAlchemyError, KeyError, ValueError) as e:
+ from superset import db
+
+ db.session.rollback()
Review Comment:
Addressed in 6ecd86c683 — all tool-level `db.session.rollback()` calls are
now wrapped in `try/except SQLAlchemyError` so a broken connection won't
prevent the standardized error response from being returned.
--
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]