cli: Add volume type to delete error messages when API call fails. (#25392)

This commit is contained in:
James Rasell
2025-03-14 15:59:41 +01:00
committed by GitHub
parent 239ac3e4bd
commit 3e1f56c1c0

View File

@@ -146,7 +146,7 @@ func (c *VolumeDeleteCommand) deleteCSIVolume(client *api.Client, volID string,
Namespace: c.namespace,
})
if err != nil {
c.Ui.Error(fmt.Sprintf("Could not find existing volume to delete: %s", err))
c.Ui.Error(fmt.Sprintf(`Could not find existing CSI volume to delete: %s`, err))
return 1
}
if len(possible) > 0 {
@@ -179,7 +179,7 @@ func (c *VolumeDeleteCommand) deleteHostVolume(client *api.Client, volID string)
if !helper.IsUUID(volID) {
stub, possible, err := getHostVolumeByPrefix(client, volID, c.namespace)
if err != nil {
c.Ui.Error(fmt.Sprintf("Could not find existing volume to delete: %s", err))
c.Ui.Error(fmt.Sprintf(`Could not find existing host volume to delete: %s`, err))
return 1
}
if len(possible) > 0 {