JoaoJandre commented on code in PR #13675:
URL: https://github.com/apache/cloudstack/pull/13675#discussion_r4537944788
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java:
##########
@@ -126,8 +127,11 @@ public void execute() {
setResponseObject(response);
} catch (Exception e) {
ApiErrorCode errorCode = e instanceof
InvalidParameterValueException ? ApiErrorCode.PARAM_ERROR :
ApiErrorCode.INTERNAL_ERROR;
- String msg = String.format("Failed to move Instance due to [%s].",
getVmId());
+ String msg = String.format("Failed to move Instance [%s].",
getVmId());
logger.error(msg, e);
+ if (e instanceof InvalidParameterValueException &&
Boolean.TRUE.equals(UserVmService.AllowExposingVmAssignFailureDetails.value()))
{
+ msg = String.format("Failed to move Instance [%s]: %s",
getVmId(), e.getMessage());
Review Comment:
Same here
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java:
##########
@@ -126,8 +127,11 @@ public void execute() {
setResponseObject(response);
} catch (Exception e) {
ApiErrorCode errorCode = e instanceof
InvalidParameterValueException ? ApiErrorCode.PARAM_ERROR :
ApiErrorCode.INTERNAL_ERROR;
- String msg = String.format("Failed to move Instance due to [%s].",
getVmId());
+ String msg = String.format("Failed to move Instance [%s].",
getVmId());
Review Comment:
I believe the VM's UUID is better here
--
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]