Skip to content

Commit 6a3d0ac

Browse files
committed
Update error message for disk compatibility with machine family
1 parent 661abc8 commit 6a3d0ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/gce-pd-csi-driver/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ func (gceCS *GCEControllerServer) executeControllerPublishVolume(ctx context.Con
540540
// If we encountered an UnsupportedDiskError, rewrite the error message to be more user friendly.
541541
// The error message from GCE is phrased around disk create on VM creation, not runtime attach.
542542
machineFamily := parseMachineFamily(instance.MachineType)
543-
return nil, status.Errorf(codes.Internal, "'%s' is not a compatible disk type with the machine family '%s', please review the GKE online documentation for available persistent disk options", udErr.DiskType, machineFamily)
543+
return nil, status.Errorf(codes.InvalidArgument, "'%s' is not a compatible disk type with the machine family '%s', please review the GCP online documentation for available persistent disk options", udErr.DiskType, machineFamily)
544544
}
545545
return nil, status.Errorf(codes.Internal, "unknown Attach error: %v", err.Error())
546546
}

0 commit comments

Comments
 (0)