throw userNotfoundException;
} catch (Exception e) {
if (e instanceof ConnectionException) {
String errorMsg = "vCenter connect failed: " + e.getMessage();
logger.error(errorMsg);
throw new VCConnectException(errorMsg, e);
} else {
logger.error("Authentication error: " + e.getMessage());
throw new BadCredentialsException(e.getMessage());
}
}