From 7eb51e853f75e9d3e365aafbf2b6835046538318 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sat, 20 Jun 2026 18:29:27 +0200 Subject: [PATCH] Handle watchlist ID row close errors --- internal/db/watchlist_ids.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/db/watchlist_ids.go b/internal/db/watchlist_ids.go index 770bc6a..ba32d67 100644 --- a/internal/db/watchlist_ids.go +++ b/internal/db/watchlist_ids.go @@ -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() {