sureshanaparti commented on code in PR #9873:
URL: https://github.com/apache/cloudstack/pull/9873#discussion_r1900148726


##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -3817,7 +3808,7 @@ private Snapshot orchestrateTakeVolumeSnapshot(Long 
volumeId, Long policyId, Lon
         }
 
         if (volume.getState() != Volume.State.Ready) {
-            throw new InvalidParameterValueException("VolumeId: " + volumeId + 
" is not in " + Volume.State.Ready + " state but " + volume.getState() + ". 
Cannot take snapshot.");
+            throw new InvalidParameterValueException(String.format("VolumeId: 
%s is not in %s state but %s. Cannot take snapshot.", volume.getVolume(), 
Volume.State.Ready, volume.getState()));

Review Comment:
   ```suggestion
               throw new InvalidParameterValueException(String.format("Volume: 
%s is not in %s state but %s. Cannot take snapshot.", volume.getVolume(), 
Volume.State.Ready, volume.getState()));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to