From 91ab508b67b9e6448eb640fb458549f362db3e33 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Wed, 28 Feb 2024 11:25:07 +0100 Subject: [PATCH] worker: ignore ErrUploadInterrupted when registering upload failure alerts --- worker/worker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/worker.go b/worker/worker.go index 17faca7cb..3812b7e84 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -1041,7 +1041,7 @@ func (w *worker) objectsHandlerPUT(jc jape.Context) { if err := jc.Check("couldn't upload object", err); err != nil { if err != nil { w.logger.Error(err) - if !errors.Is(err, ErrShuttingDown) { + if !errors.Is(err, ErrShuttingDown) && !errors.Is(err, errUploadInterrupted) { w.registerAlert(newUploadFailedAlert(bucket, path, up.ContractSet, mimeType, rs.MinShards, rs.TotalShards, len(contracts), up.UploadPacking, false, err)) } } @@ -1179,7 +1179,7 @@ func (w *worker) multipartUploadHandlerPUT(jc jape.Context) { if jc.Check("couldn't upload object", err) != nil { if err != nil { w.logger.Error(err) - if !errors.Is(err, ErrShuttingDown) { + if !errors.Is(err, ErrShuttingDown) && !errors.Is(err, errUploadInterrupted) { w.registerAlert(newUploadFailedAlert(bucket, path, up.ContractSet, "", rs.MinShards, rs.TotalShards, len(contracts), up.UploadPacking, true, err)) } }