From 6001b97587590ebadd1be4770f767489eca8e418 Mon Sep 17 00:00:00 2001 From: Alexis MacAskill Date: Thu, 8 Jun 2023 23:22:35 +0000 Subject: [PATCH] Filter out user errors from GetDisk error returned from ControllerPublishVolume --- pkg/gce-pd-csi-driver/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gce-pd-csi-driver/controller.go b/pkg/gce-pd-csi-driver/controller.go index e0c4c7e9f..ea58778a5 100644 --- a/pkg/gce-pd-csi-driver/controller.go +++ b/pkg/gce-pd-csi-driver/controller.go @@ -584,7 +584,7 @@ func (gceCS *GCEControllerServer) executeControllerPublishVolume(ctx context.Con if gce.IsGCENotFoundError(err) { return nil, status.Errorf(codes.NotFound, "Could not find disk %v: %v", volKey.String(), err.Error()), diskType } - return nil, status.Errorf(codes.Internal, "Failed to getDisk: %v", err.Error()), diskType + return nil, common.LoggedError("Failed to getDisk: ", err), diskType } instanceZone, instanceName, err := common.NodeIDToZoneAndName(nodeID) if err != nil {