Copilot commented on code in PR #12650:
URL: https://github.com/apache/cloudstack/pull/12650#discussion_r3947500260


##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -2479,4 +2479,9 @@ public VirtualMachineTemplate 
linkUserDataToTemplate(LinkUserDataToTemplateCmd c
 
         return _tmpltDao.findById(template.getId());
     }
+
+    private void throwExceptionForImageStoreObtentionFailure(Long zoneId, 
String operation) {
+        logger.error("Cannot find an image store for zone [{}].", zoneId);
+        throw new CloudRuntimeException(String.format("Failed to %s. Please 
contact the cloud administrator.", operation));
+    }

Review Comment:
   The log line drops the operation context, which makes the error harder to 
correlate when this helper is reused for multiple flows (template creation vs 
volume upload). Include the `operation` in the log message so operators can 
identify the failing action without relying on stack traces.



-- 
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