From 4cc23f0d6a07a2a40cf90c1477c23c68bf508ed6 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 b2157960f..c2e40a69c 100644 --- a/pkg/gce-pd-csi-driver/controller.go +++ b/pkg/gce-pd-csi-driver/controller.go @@ -578,7 +578,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 {