Skip to content

Commit 4264801

Browse files
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>
1 parent ca57425 commit 4264801

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

backend.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ def run_simulation():
7070
logger.exception("Unexpected error during simulation:")
7171
return jsonify({
7272
"status": "error",
73-
"message": "An unexpected error occurred",
74-
"error": str(e)
73+
"message": "An unexpected error occurred"
7574
}), 500
7675

7776
@app.route("/run_simulation_stream", methods=["POST"])
@@ -157,7 +156,6 @@ def generate():
157156
return jsonify({
158157
"status": "error",
159158
"message": "An unexpected error occurred",
160-
"error": str(e),
161159
"timestamp": time.time()
162160
}), 500
163161

0 commit comments

Comments
 (0)