Skip to content

Commit 3703386

Browse files
Merge pull request #21 from GitTimeraider/alert-autofix-3
Potential fix for code scanning alert no. 3: Information exposure through an exception
2 parents c98412a + 59dde81 commit 3703386

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)