From 42648013d12a530d81f2e06afda693cdf0e32076 Mon Sep 17 00:00:00 2001 From: Mirko Zitkovich <73123551+MirkoZETA@users.noreply.github.com> Date: Sat, 8 Mar 2025 20:06:18 -0300 Subject: [PATCH] Potential fix for code scanning alert no. 3: Information exposure through an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- backend.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend.py b/backend.py index 30b7322..412e4ca 100644 --- a/backend.py +++ b/backend.py @@ -70,8 +70,7 @@ def run_simulation(): logger.exception("Unexpected error during simulation:") return jsonify({ "status": "error", - "message": "An unexpected error occurred", - "error": str(e) + "message": "An unexpected error occurred" }), 500 @app.route("/run_simulation_stream", methods=["POST"]) @@ -157,7 +156,6 @@ def generate(): return jsonify({ "status": "error", "message": "An unexpected error occurred", - "error": str(e), "timestamp": time.time() }), 500