Skip to content

Commit

Permalink
Do not override description of wrapped error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ahadas authored and liranr23 committed Mar 10, 2024
1 parent 64a788c commit 5a29f71
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/plan/adapter/ovirt/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a29f71

Please sign in to comment.