Skip to content

Commit c1910ed

Browse files
Merge pull request #21 from GitTimeraider/alert-autofix-12
Potential fix for code scanning alert no. 12: Information exposure through an exception
2 parents be589d0 + 45e4aa7 commit c1910ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def test_connection():
119119

120120
except Exception as e:
121121
print(f"Test connection error: {str(e)}")
122-
return jsonify({'error': str(e), 'success': False}), 200
122+
print(traceback.format_exc())
123+
return jsonify({'error': 'An internal error has occurred.', 'success': False}), 200
123124

124125
# Debug route to check available routes
125126
@settings_bp.route('/api/debug-routes', methods=['GET'])

0 commit comments

Comments
 (0)