Skip to content

Commit

Permalink
worker: ignore ErrUploadInterrupted when registering upload failure a…
Browse files Browse the repository at this point in the history
…lerts
  • Loading branch information
ChrisSchinnerl committed Feb 28, 2024
1 parent 54874de commit 91ab508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Expand Down Expand Up @@ -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))
}
}
Expand Down

0 comments on commit 91ab508

Please sign in to comment.