diff --git a/iris-client-bff/src/main/java/iris/client_bff/status/eps/EPSStatusClient.java b/iris-client-bff/src/main/java/iris/client_bff/status/eps/EPSStatusClient.java index 2b7abb097..986956836 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/status/eps/EPSStatusClient.java +++ b/iris-client-bff/src/main/java/iris/client_bff/status/eps/EPSStatusClient.java @@ -14,6 +14,7 @@ import java.net.ConnectException; import java.net.SocketTimeoutException; import java.util.List; +import java.util.Objects; import java.util.Set; import javax.validation.Valid; @@ -43,6 +44,7 @@ public Apps getAvailableApps() { return epsRpcClient.invoke(methodName, null, Directory.class).entries().stream() .filter(directoryEntry -> directoryEntry.groups().contains("checkin-apps")) .map(DirectoryEntry::name) + .filter(Objects::nonNull) .map(App::new) .collect(collectingAndThen(toList(), Apps::new)); diff --git a/iris-client-bff/src/main/java/iris/client_bff/status/web/AppStatusController.java b/iris-client-bff/src/main/java/iris/client_bff/status/web/AppStatusController.java index 6cb8321d1..39d5c89f1 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/status/web/AppStatusController.java +++ b/iris-client-bff/src/main/java/iris/client_bff/status/web/AppStatusController.java @@ -8,6 +8,7 @@ import iris.client_bff.status.web.AppStatusController.AppStatusInfo.Info; import lombok.AllArgsConstructor; import lombok.Value; +import lombok.extern.slf4j.Slf4j; import java.util.List; @@ -27,6 +28,7 @@ @RequestMapping("/status/checkin-apps") @Validated @AllArgsConstructor +@Slf4j public class AppStatusController { private StatusService statusService; @@ -37,6 +39,9 @@ public List getApps() { try { return statusService.getApps().toList(); } catch (Exception e) { + + log.error("Can't get apps from StatusService: ", e); + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage()); } }