File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/alibabacloud_dms_mcp_server Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ async def get_meta_table_detail_info(
268268 raise
269269
270270def _format_as_markdown_table (column_names : List [str ], rows : List [Dict [str , Any ]]) -> str :
271- if not column_names or not rows : return ""
271+ if not column_names : return ""
272272 header = "| " + " | " .join (column_names ) + " |"
273273 separator = "| " + " | " .join (["---" ] * len (column_names )) + " |"
274274 table_rows_str = [header , separator ]
@@ -306,7 +306,8 @@ async def execute_script(
306306 Success = data .get ('Success' , False ))
307307 except Exception as e :
308308 logger .error (f"Error in execute_script: { e } " )
309- raise
309+ if "The instance is not in secure hosting mode" in str (e ):
310+ return "当前实例尚未开启安全托管功能。您可以通过DMS控制台免费开启「安全托管模式」。请注意,该操作需要管理员或DBA身份权限。"
310311
311312async def nl2sql (
312313 database_id : str = Field (description = "DMS databaseId" ),
You can’t perform that action at this time.
0 commit comments