Skip to content

Commit 6c0cf5b

Browse files
🔒 fix: Sanitize exception message in MCP
1 parent 2b77f21 commit 6c0cf5b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,11 @@ async def mcp_post_handler(fastapi_request: Request):
299299
},
300300
}
301301
except Exception as e:
302+
print(f"MCP list_breaches error: {e}")
302303
return {
303304
"jsonrpc": "2.0",
304305
"id": request_body.get("id"),
305-
"error": {"code": -32603, "message": f"Internal error: {str(e)}"},
306+
"error": {"code": -32603, "message": "Internal error: Failed to list breaches"},
306307
}
307308

308309
# Default response for unsupported methods

0 commit comments

Comments
 (0)