File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -424,7 +424,7 @@ func (b *binder) writeOne(bnd binding) error {
424
424
default :
425
425
panic ("unhittable" )
426
426
}
427
- if err != nil && ! pqErrIsCanceled (err ) {
427
+ if err != nil && ! database . IsQueryCanceledError (err ) {
428
428
b .logger .Error (b .ctx , "failed to write binding to database" ,
429
429
slog .F ("client_id" , bnd .client ),
430
430
slog .F ("agent_id" , bnd .agent ),
@@ -434,12 +434,6 @@ func (b *binder) writeOne(bnd binding) error {
434
434
return err
435
435
}
436
436
437
- // This is returned when the context is canceled on a running query. pq does not
438
- // export an error for this.
439
- func pqErrIsCanceled (err error ) bool {
440
- return err .Error () == "pq: canceling statement due to user request"
441
- }
442
-
443
437
// storeBinding stores the latest binding, where we interpret node == nil as removing the binding. This keeps the map
444
438
// from growing without bound.
445
439
func (b * binder ) storeBinding (bnd binding ) {
You can’t perform that action at this time.
0 commit comments