mirror of https://github.com/apache/jclouds.git
better error on network timeouts
This commit is contained in:
parent
162214f209
commit
7d93c86588
|
@ -54,6 +54,9 @@ public class TaskSuccess implements Predicate<URI> {
|
|||
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());
|
||||
|
|
Loading…
Reference in New Issue