diff --git a/pkg/sidecar-controller/snapshot_controller.go b/pkg/sidecar-controller/snapshot_controller.go index 99ed16f2..085f16f9 100644 --- a/pkg/sidecar-controller/snapshot_controller.go +++ b/pkg/sidecar-controller/snapshot_controller.go @@ -260,21 +260,21 @@ func (ctrl *csiSnapshotSideCarController) checkandUpdateContentStatusOperation(c if content.Spec.VolumeSnapshotClassName != nil { class, err := ctrl.getSnapshotClass(*content.Spec.VolumeSnapshotClassName) if err != nil { - klog.Errorf("Failed to getSnapshotClass %s", err) - return nil, fmt.Errorf("cannot get snapshot class %s for snapshot content %s", *content.Spec.VolumeSnapshotClassName, err) + klog.Errorf("Failed to get snapshot class %s for snapshot content %s", *content.Spec.VolumeSnapshotClassName, err) + return nil, fmt.Errorf("failed to get snapshot class %s for snapshot content %s", *content.Spec.VolumeSnapshotClassName, err) } snapshotterListSecretRef, err := utils.GetSecretReference(utils.SnapshotterListSecretParams, class.Parameters, content.GetObjectMeta().GetName(), nil) if err != nil { - klog.Errorf("Failed to get secret reference for snapshot %s: %s", content.Name, err.Error()) - return nil, fmt.Errorf("cannot get secret reference for snapshot content %#v", content.Name) + klog.Errorf("Failed to get secret reference for snapshot %s: %s", content.Name, err) + return nil, fmt.Errorf("failed to get secret reference for snapshot %s: %s", content.Name, err) } snapshotterListCredentials, err = utils.GetCredentials(ctrl.client, snapshotterListSecretRef) if err != nil { // Continue with deletion, as the secret may have already been deleted. - klog.Errorf("Failed to get credentials for snapshot %s: %s", content.Name, err.Error()) - return nil, fmt.Errorf("cannot get credentials for snapshot content %#v", content.Name) + klog.Errorf("Failed to get credentials for snapshot %s: %s", content.Name, err) + return nil, fmt.Errorf("failed to get credentials for snapshot %s: %s", content.Name, err) } }