Skip to content

Commit

Permalink
🐛 fix: s3: do not ignore non-aws errors when deleting object
Browse files Browse the repository at this point in the history
If any error of non awserr.Error type happens when trying to list a
bootstrap data object, it would be silently ignored.
  • Loading branch information
r4f4 committed Mar 18, 2024
1 parent fc19825 commit 39d097f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/cloud/services/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,9 @@ func (s *Service) Delete(m *scope.MachineScope) error {
case s3.ErrCodeNoSuchBucket:
s.scope.Debug("Bucket does not exist", "bucket", bucket)
return nil
default:
return errors.Wrap(aerr, "deleting S3 object")
}
}
return errors.Wrap(err, "deleting S3 object")
}

s.scope.Info("Deleting S3 object", "bucket", bucket, "key", key)
Expand Down

0 comments on commit 39d097f

Please sign in to comment.