Handle watchlist ID row close errors

This commit is contained in:
2026-06-20 18:29:27 +02:00
committed by Milas Holsting
parent 0957329c41
commit 7eb51e853f

View File

@@ -2,6 +2,7 @@ package db
import (
"context"
"mal/pkg/errlog"
"strings"
)
@@ -24,7 +25,7 @@ func (q *Queries) GetUserWatchlistAnimeIDs(ctx context.Context, userID string, a
if err != nil {
return nil, err
}
defer func() { _ = rows.Close() }()
defer errlog.Close(rows, "failed to close watchlist id rows")
matches := make([]int64, 0, len(animeIDs))
for rows.Next() {