diff --git a/pkg/controller/publisher.go b/pkg/controller/publisher.go index bfd756b7..7a00d75a 100644 --- a/pkg/controller/publisher.go +++ b/pkg/controller/publisher.go @@ -2,6 +2,7 @@ package controller import ( "context" + "fmt" "github.com/Seagate/seagate-exos-x-csi/pkg/common" "github.com/Seagate/seagate-exos-x-csi/pkg/node_service" @@ -40,7 +41,7 @@ func (driver *Controller) ControllerPublishVolume(ctx context.Context, req *csi. initiators, err := node_service.GetNodeInitiators(nodeIP, reqType) if err != nil { klog.ErrorS(err, "error getting node initiators", "node-ip", nodeIP, "storage-protocol", reqType) - return nil, err + return nil, status.Error(codes.NotFound, fmt.Sprintf("Could not retrieve initiators for scheduled node(%s)", nodeIP)) } volumeName, _ := common.VolumeIdGetName(req.GetVolumeId())