throw AmbariApiException.CANNOT_CONNECT_AMBARI_SERVER(e);
}
String stackJson = handleAmbariResponse(response);
logger.debug("Response of stack from ambari server:");
logger.debug(stackJson);
ApiStack apiStack = ApiUtils.jsonToObject(ApiStack.class, stackJson);
return apiStack;
}