From 5a29f71074a20f33622f9fc9a3d5eb512accb9a3 Mon Sep 17 00:00:00 2001 From: Arik Hadas Date: Sun, 10 Mar 2024 09:45:49 +0200 Subject: [PATCH] Do not override description of wrapped error The liberr.Wrap function should get an odd number of arguments, otherwise the description of the specified error would be overridden (follow-up on #772). Signed-off-by: Arik Hadas --- pkg/controller/plan/adapter/ovirt/builder.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/controller/plan/adapter/ovirt/builder.go b/pkg/controller/plan/adapter/ovirt/builder.go index d764aab47..5eaf135f7 100644 --- a/pkg/controller/plan/adapter/ovirt/builder.go +++ b/pkg/controller/plan/adapter/ovirt/builder.go @@ -735,8 +735,7 @@ func (r *Builder) PopulatorVolumes(vmRef ref.Ref, annotations map[string]string, pvc, err = r.persistentVolumeClaimWithSourceRef(diskAttachment, storageClassName, populatorName, annotations) if err != nil { if !k8serr.IsAlreadyExists(err) { - err = liberr.Wrap(err, "couldn't build the PVC", "diskAttachmentID", diskAttachment.DiskAttachment.ID, - "storageClassName", storageClassName, "populatorName", populatorName) + err = liberr.Wrap(err, "disk attachment", diskAttachment.DiskAttachment.ID, "storage class", storageClassName, "populator", populatorName) return } err = nil