This is an automated email from the ASF dual-hosted git repository.
ofuks pushed a commit to branch DLAB-1571
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1571 by this push:
new bf314b8 Fixed issue with displaying list of resources
bf314b8 is described below
commit bf314b8f2968694ccfbfc94c677c5e8ea49a00e4
Author: Oleh Fuks <[email protected]>
AuthorDate: Thu Mar 26 13:45:17 2020 +0200
Fixed issue with displaying list of resources
---
.../service/impl/InfrastructureInfoServiceImpl.java | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
index eaf7071..deb0019 100644
---
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
+++
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
@@ -44,6 +44,7 @@ import com.jcabi.manifests.Manifests;
import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@@ -98,8 +99,16 @@ public class InfrastructureInfoServiceImpl implements
InfrastructureInfoService
List<BillingData> collect =
e.getValue()
.stream()
- .map(exp ->
billingServiceNew.getExploratoryRemoteBillingData(user, (String)
exp.get("endpoint"),
-
expDAO.findExploratories(e.getKey(), (String) exp.get("endpoint"),
user.getName())))
+ .map(exp -> {
+
List<BillingData> exploratoryRemoteBillingData = new ArrayList<>();
+ try {
+
exploratoryRemoteBillingData =
billingServiceNew.getExploratoryRemoteBillingData(user, (String)
exp.get("endpoint"),
+
expDAO.findExploratories(e.getKey(), (String)
exp.get("endpoint"), user.getName()));
+ } catch
(Exception ex) {
+
log.error("Cannot retrieve billing information", ex);
+ }
+ return
exploratoryRemoteBillingData;
+ })
.flatMap(Collection::stream)
.collect(Collectors.toList());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]