Skip to content

Commit

Permalink
Fix error message for unknown unpack state
Browse files Browse the repository at this point in the history
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
  • Loading branch information
varshaprasad96 committed Jun 11, 2024
1 parent f9cca2a commit 6bc072f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/controllers/clusterextension_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,9 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
}
setStatusUnpacked(ext, fmt.Sprintf("unpack successful: %v", unpackResult.Message))
default:
setStatusUnpackFailed(ext, fmt.Sprintf("unpack successful: %v", unpackResult.Message))
return ctrl.Result{}, fmt.Errorf("unexpected unpack status: %v", err)
setStatusUnpackFailed(ext, "unexpected unpack status")
// We previously exit with a failed status if error is not nil.
return ctrl.Result{}, fmt.Errorf("unexpected unpack status: %v", unpackResult.Message)
}

bundleFS, err := r.Storage.Load(ctx, ext)
Expand Down

0 comments on commit 6bc072f

Please sign in to comment.