if (state != DeploymentState.unknown) {
throw new IllegalStateException(String.format("App %s is already deployed with state %s", deploymentId, state));
}
}
private Mono<Void> bindServices(String deploymentId, AppDeploymentRequest request) {
<BUG>return servicesToBind(request)
</BUG>
.flatMap(service -> requestBindService(deploymentId, service)
.doOnSuccess(v -> logger.debug("Binding service {} to app {}", service, deploymentId))
.doOnError(e -> logger.error(String.format("Failed to bind service %s to app %s", service, deploymentId), e)))

if (state != DeploymentState.unknown) {
throw new IllegalStateException(String.format("App %s is already deployed with state %s", deploymentId, state));
}
}
private Mono<Void> bindServices(String deploymentId, AppDeploymentRequest request) {
return Flux.fromIterable(servicesToBind(request))
.flatMap(service -> requestBindService(deploymentId, service)
.doOnSuccess(v -> logger.debug("Binding service {} to app {}", service, deploymentId))
.doOnError(e -> logger.error(String.format("Failed to bind service %s to app %s", service, deploymentId), e)))
