Skip to content

Commit

Permalink
Fix retry in case of Marathon dep failure (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
maricaantonacci committed May 12, 2020
1 parent 1217e2d commit 0dd402f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,14 @@ public boolean doDeploy(DeploymentMessage deploymentMessage) {
vaultService.getServiceUri()
.map(URI::toString)
.ifPresent(cloudProviderEndpoint::setVaultEndpoint);
executeWithClient(cloudProviderEndpoint, requestedWithToken,
client -> client.createGroup(group));
try {
executeWithClient(cloudProviderEndpoint, requestedWithToken,
client -> client.createGroup(group));
} catch (MarathonException ex) {
throw new BusinessWorkflowException(ErrorCode.CLOUD_PROVIDER_ERROR,
"Error creating Marathon App Group",
new DeploymentException(ex.getMessage()));
}
return true;

}
Expand Down

0 comments on commit 0dd402f

Please sign in to comment.