Files
mempalace/tests
Igor Lins e Silva 3e92719710 fix(mcp): surface create_tunnel ValueError instead of masking it (#1473)
tool_create_tunnel sanitized names inside a try/except ValueError but
called create_tunnel() *outside* it, so any ValueError create_tunnel
raises (empty/non-string endpoints today, room-existence checks once
#1469 lands) escaped and the MCP framework wrapped it as the opaque
'Internal tool error'. Wrap the create_tunnel() call in the same
try/except and return {"error": str(e)}, mirroring sibling tools
(tool_add_drawer, tool_list_tunnels). Adds a regression test that
monkeypatches create_tunnel to raise and asserts the message is
surfaced verbatim.

Closes #1473
2026-05-18 17:25:09 -03:00
..