From 7edccf2c1bca1059bc380a9d99a8ce4031113152 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Thu, 4 Jun 2026 13:35:13 -0500 Subject: [PATCH] Handle unused error from RowsAffected in RecordUpdaterSetStatus The error returned by tag.RowsAffected() was silently ignored. Log it as a warning when it occurs, since the transaction has already been committed and the operation itself succeeded. While this error will most likely not happen we should handle it just in case. Claude Opus 4.6 was used in part of creating this issue. Fixes finding from CodeQL quality. --- datastore/sqlite/updater.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/datastore/sqlite/updater.go b/datastore/sqlite/updater.go index e00793b..a1c0566 100644 --- a/datastore/sqlite/updater.go +++ b/datastore/sqlite/updater.go @@ -124,10 +124,17 @@ func (ms *sqliteMatcherStore) RecordUpdaterSetStatus(ctx context.Context, update } ra, err := tag.RowsAffected() - zlog.Debug(ctx). - Str("factory", updaterSet). - Int64("rowsAffected", ra). - Msg("status updated for factory updaters") + if err != nil { + zlog.Warn(ctx). + Err(err). + Str("factory", updaterSet). + Msg("could not determine rows affected for factory updaters status update") + } else { + zlog.Debug(ctx). + Str("factory", updaterSet). + Int64("rowsAffected", ra). + Msg("status updated for factory updaters") + } return nil }