Skip to content

Commit 2b77f21

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

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
@@ -254,12 +254,13 @@ async def mcp_post_handler(fastapi_request: Request):
254254
},
255255
}
256256
except Exception as e:
257+
print(f"MCP get_breach_analytics error: {e}")
257258
return {
258259
"jsonrpc": "2.0",
259260
"id": request_body.get("id"),
260261
"error": {
261262
"code": -32603,
262-
"message": f"Internal error: {str(e)}",
263+
"message": "Internal error: Failed to get breach analytics",
263264
},
264265
}
265266
else:

0 commit comments

Comments
 (0)