enh: display mcp connection error

This commit is contained in:
Timothy Jaeryang Baek 2025-11-04 13:48:23 -05:00
parent 414ab51d5d
commit 03f207b803

View file

@ -1306,6 +1306,17 @@ async def process_chat_payload(request, form_data, user, metadata, model):
} }
except Exception as e: except Exception as e:
log.debug(e) log.debug(e)
if event_emitter:
await event_emitter(
{
"type": "chat:message:error",
"data": {
"error": {
"content": f"Failed to connect to MCP server '{server_id}'"
}
},
}
)
continue continue
tools_dict = await get_tools( tools_dict = await get_tools(