From 63794be38d614e5db438be6961034700597fe67c Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 16 Jan 2026 15:34:06 +1100 Subject: [PATCH] improve log noise --- db/helpers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/helpers.go b/db/helpers.go index a26121b..e0df9a8 100644 --- a/db/helpers.go +++ b/db/helpers.go @@ -64,6 +64,10 @@ func execLog(ctx context.Context, dbConn *sqlx.DB, query string, args ...interfa func getLog(ctx context.Context, dbConn *sqlx.DB, dest interface{}, query string, args ...interface{}) error { err := dbConn.GetContext(ctx, dest, query, args...) if err != nil { + if errors.Is(err, sql.ErrNoRows) { + slog.Debug("db get returned no rows", "query", strings.TrimSpace(query)) + return err + } slog.Warn("db get failed", "query", strings.TrimSpace(query), "error", err) } return err