Skip to content

Commit ca6ac55

Browse files
Potential fix for code scanning alert no. 14: Information exposure through an exception
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent d86c2ec commit ca6ac55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/flask/routes/auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def signup():
3535
}), 201
3636

3737
except Exception as e:
38-
return jsonify({"error": f"Signup failed: {str(e)}"}), 400
38+
logger.error("Exception in signup: %s\n%s", str(e), traceback.format_exc())
39+
return jsonify({"error": "Signup failed. Please try again later."}), 400
3940

4041

4142
@bp.route("/signin", methods=["POST"])

0 commit comments

Comments
 (0)