From 699f5ca8c1f73ff7e4b70f0f9273ffcb1c195cdc Mon Sep 17 00:00:00 2001 From: Till <2353100+S7evinK@users.noreply.github.com> Date: Thu, 9 Nov 2023 08:42:33 +0100 Subject: More `rows.Close()` and `rows.Err()` (#3262) Looks like we missed some `rows.Close()` Even though `rows.Err()` is mostly not necessary, we should be more consistent in the DB layer. [skip ci] --- userapi/storage/postgres/one_time_keys_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'userapi/storage/postgres/one_time_keys_table.go') diff --git a/userapi/storage/postgres/one_time_keys_table.go b/userapi/storage/postgres/one_time_keys_table.go index 972a5914..a00f4d6f 100644 --- a/userapi/storage/postgres/one_time_keys_table.go +++ b/userapi/storage/postgres/one_time_keys_table.go @@ -134,7 +134,7 @@ func (s *oneTimeKeysStatements) CountOneTimeKeys(ctx context.Context, userID, de } counts.KeyCount[algorithm] = count } - return counts, nil + return counts, rows.Err() } func (s *oneTimeKeysStatements) InsertOneTimeKeys(ctx context.Context, txn *sql.Tx, keys api.OneTimeKeys) (*api.OneTimeKeysCount, error) { -- cgit v1.2.3