From 45e4aa7cf70abaf4528c32be78932b66631e7c4b Mon Sep 17 00:00:00 2001 From: Timeraider <57343973+GitTimeraider@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:58:52 +0200 Subject: [PATCH] Potential fix for code scanning alert no. 12: Information exposure through an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- app/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/settings.py b/app/settings.py index b8d1f95..3bbffbc 100644 --- a/app/settings.py +++ b/app/settings.py @@ -119,7 +119,8 @@ def test_connection(): except Exception as e: print(f"Test connection error: {str(e)}") - return jsonify({'error': str(e), 'success': False}), 200 + print(traceback.format_exc()) + return jsonify({'error': 'An internal error has occurred.', 'success': False}), 200 # Debug route to check available routes @settings_bp.route('/api/debug-routes', methods=['GET'])