From 49f1497f45d264bee48c00ed93bb9c3cb32bc085 Mon Sep 17 00:00:00 2001 From: Robin Dittmar Date: Mon, 20 Jul 2026 21:11:46 +0200 Subject: [PATCH] fix: removed error handling for `tx.Rollback()` --- internal/repository/list.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/repository/list.go b/internal/repository/list.go index f7fb7a4..fec3bd1 100644 --- a/internal/repository/list.go +++ b/internal/repository/list.go @@ -22,12 +22,7 @@ func (r *ListRepo) CreateList(ctx context.Context, name string, userIDs []string if err != nil { return nil, fmt.Errorf("begin transaction: %w", err) } - defer func() { - err := tx.Rollback() - if err != nil { - slog.Error("failed to rollback transaction", slog.Any("error", err)) - } - }() + defer tx.Rollback() list := &domain.List{Name: name}