marcaurele commented on a change in pull request #837: CLOUDSTACK-8855 Improve 
Error Message for Host Alert State and reconnect host API.
URL: https://github.com/apache/cloudstack/pull/837#discussion_r140991030
 
 

 ##########
 File path: 
api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java
 ##########
 @@ -100,17 +103,18 @@ public Long getInstanceId() {
     @Override
     public void execute() {
         try {
-            Host result = _resourceService.reconnectHost(this);
-            if (result != null) {
-                HostResponse response = 
_responseGenerator.createHostResponse(result);
-                response.setResponseName(getCommandName());
-                this.setResponseObject(response);
-            } else {
-                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, 
"Failed to reconnect host");
-            }
-        } catch (Exception ex) {
-            s_logger.warn("Exception: ", ex);
-            throw new 
ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage());
+            Host result =_resourceService.reconnectHost(this);
 
 Review comment:
   nitpick: missing space -> `result = _resourceService`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to