Skip to content

Commit 59dde81

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 c98412a commit 59dde81

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ def test_backup_with_context():
540540
result = test_backup_with_context()
541541
return jsonify({'success': True, 'message': result})
542542
except Exception as e:
543-
return jsonify({'success': False, 'error': str(e)}), 500
543+
logger.error(f"Error in /api/test-backup endpoint for repository {repo_id}: {e}", exc_info=True)
544+
return jsonify({'success': False, 'error': 'An internal error occurred.'}), 500
544545

545546
@app.route('/api/theme', methods=['POST'])
546547
@login_required

0 commit comments

Comments
 (0)