Add error checking for every occurance of rows.Next()

This commit is contained in:
2025-02-03 10:40:54 +01:00
parent 1cf537662a
commit 9b4a8e1890
6 changed files with 35 additions and 2 deletions

View File

@@ -68,6 +68,10 @@ func (db *DB) GetArticleContributors(c *Config, articleID int64) ([]*User, error
contributors = append(contributors, contributor)
}
if err = rows.Err(); err != nil {
return nil, fmt.Errorf("error iterating over rows: %v", err)
}
return contributors, nil
}