Skip to content

Commit dc7908e

Browse files
authored
Merge pull request #502 from huffmanca/address-content-nil-error
Correct snapshotContent error propagation
2 parents 4aa47e6 + c554274 commit dc7908e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/sidecar-controller/snapshot_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ func (ctrl *csiSnapshotSideCarController) createSnapshotWrapper(content *crdv1.V
300300
// storage system has responded with an error
301301
klog.Infof("createSnapshotWrapper: CreateSnapshot for content %s returned error: %v", content.Name, err)
302302
if isCSIFinalError(err) {
303-
if err := ctrl.removeAnnVolumeSnapshotBeingCreated(content); err != nil {
304-
return nil, fmt.Errorf("failed to remove VolumeSnapshotBeingCreated annotation from the content %s: %s", content.Name, err)
303+
if removeAnnotationErr := ctrl.removeAnnVolumeSnapshotBeingCreated(content); removeAnnotationErr != nil {
304+
return nil, fmt.Errorf("failed to remove VolumeSnapshotBeingCreated annotation from the content %s: %s", content.Name, removeAnnotationErr)
305305
}
306306
}
307307

0 commit comments

Comments
 (0)