π OpenHands: AI-Driven Development
chore: log stack trace when failed to connect in mcp (#8804)
Xingyao Wang277b87413baa
diff --git a/openhands/mcp/utils.py b/openhands/mcp/utils.pyindex 9beb19bc49..7c7a1cf238 100644--- a/openhands/mcp/utils.py+++ b/openhands/mcp/utils.py@@ -69,7 +69,9 @@ async def create_mcp_clients(mcp_clients.append(client)logger.info(f'Connected to MCP server {server_url} via SSE')except Exception as e:- logger.error(f'Failed to connect to {server_url}: {str(e)}')+ logger.error(+ f'Failed to connect to {server_url}: {str(e)}', exc_info=True+ )try:await client.disconnect()except Exception as disconnect_error: