use of com.google.api.services.compute.model.Operation.Error.Errors in project cloudbreak by hortonworks.
the class AbstractGcpResourceBuilder method checkError.
protected void checkError(Operation execute) {
if (execute.getError() != null) {
String msg = null;
StringBuilder error = new StringBuilder();
if (execute.getError().getErrors() != null) {
for (Errors errors : execute.getError().getErrors()) {
error.append(String.format("code: %s -> message: %s %s", errors.getCode(), errors.getMessage(), System.lineSeparator()));
}
msg = error.toString();
}
throw new CloudConnectorException(msg);
}
}
Aggregations