fix(coderd): use database.IsQueryCanceledError instead of xerrors.Is(err, context.Canceled) (#12325)

This commit is contained in:
Cian Johnston 2024-02-28 11:19:57 +00:00 committed by GitHub
parent eb4a1e2568
commit 1465ee2ed1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ func (a *LifecycleAPI) UpdateLifecycle(ctx context.Context, req *agentproto.Upda
ReadyAt: readyAt,
})
if err != nil {
if !xerrors.Is(err, context.Canceled) {
if !database.IsQueryCanceledError(err) {
// not an error if we are canceled
logger.Error(ctx, "failed to update lifecycle state", slog.Error(err))
}