diff --git a/common/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java b/common/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java index d83b318d8f..2dcb16a881 100644 --- a/common/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java @@ -54,6 +54,9 @@ public class TaskSuccess implements Predicate { logger.trace("looking for status on task %s", taskId); Task task = client.getTask(taskId); + // perhaps task isn't available, yet + if (task == null) + return false; logger.trace("%s: looking for status %s: currently: %s", task, TaskStatus.SUCCESS, task.getStatus()); if (task.getStatus() == TaskStatus.ERROR) throw new RuntimeException("error on task: " + task.getHref() + " error: " + task.getError());