From 431d23d04127d20bf9a4dc80598a88dc5b819e12 Mon Sep 17 00:00:00 2001 From: Spike Curtis Date: Mon, 5 Feb 2024 16:16:55 +0400 Subject: [PATCH] fix: stop logging error on query canceled --- coderd/workspaceagentsrpc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coderd/workspaceagentsrpc.go b/coderd/workspaceagentsrpc.go index 0167b875b3879..bdd244b4a7958 100644 --- a/coderd/workspaceagentsrpc.go +++ b/coderd/workspaceagentsrpc.go @@ -473,7 +473,9 @@ func (m *agentConnectionMonitor) monitor(ctx context.Context) { err = m.updateConnectionTimes(ctx) if err != nil { reason = err.Error() - m.logger.Error(ctx, "failed to update agent connection times", slog.Error(err)) + if !database.IsQueryCanceledError(err) { + m.logger.Error(ctx, "failed to update agent connection times", slog.Error(err)) + } return } if connectionStatusChanged {