Skip to content

Commit 508db3e

Browse files
committed
fixup! fix: prevent error log when pgcoord query is canceled.
1 parent cf4a423 commit 508db3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/database/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func IsUniqueViolation(err error, uniqueConstraints ...UniqueConstraint) bool {
4040
func IsQueryCanceledError(err error) bool {
4141
var pqErr *pq.Error
4242
if errors.As(err, &pqErr) {
43-
return pqErr.Code.Name() == "query_canceled"
43+
return pqErr.Code == "57014" // query_canceled
4444
}
4545

4646
return false

0 commit comments

Comments
 (0)