diff --git a/src/main/java/com/cx/restclient/common/Waiter.java b/src/main/java/com/cx/restclient/common/Waiter.java index 43558bc6..19c7f0f7 100644 --- a/src/main/java/com/cx/restclient/common/Waiter.java +++ b/src/main/java/com/cx/restclient/common/Waiter.java @@ -46,6 +46,9 @@ public T waitForTaskToFinish(String taskId, Integer scanTimeoutSec, Logger log) if (retry <= 0) { throw new CxClientException(FAILED_MSG + scanType + ". Error message: " + e.getMessage(), e); } + if (statusResponse == null || (statusResponse.getBaseStatus() == null)) { + statusResponse = (T) new BaseStatus(Status.SOURCE_PULLING_AND_DEPLOYMENT); + } if (statusResponse == null || (statusResponse.getBaseStatus() == null)) { statusResponse = (T) new BaseStatus(Status.IN_PROGRESS); } diff --git a/src/main/java/com/cx/restclient/dto/Status.java b/src/main/java/com/cx/restclient/dto/Status.java index 3494ad53..390420ec 100644 --- a/src/main/java/com/cx/restclient/dto/Status.java +++ b/src/main/java/com/cx/restclient/dto/Status.java @@ -8,8 +8,8 @@ public enum Status { IN_PROGRESS("In progress"), SUCCEEDED("Succeeded"), - FAILED("Failed"); - + FAILED("Failed"), + SOURCE_PULLING_AND_DEPLOYMENT ("SourcePullingAndDeployment"); private String value;