Skip to content

Commit

Permalink
chore: improves logging to find a hidden NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
jekutzsche committed May 4, 2022
1 parent 41f56d1 commit 6ae7c6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public Apps getAvailableApps() {

return epsRpcClient.invoke(methodName, null, Directory.class).entries().stream()
.filter(directoryEntry -> directoryEntry.groups().contains("checkin-apps"))
.peek(System.out::println)
.map(DirectoryEntry::name)
.map(App::new)
.collect(collectingAndThen(toList(), Apps::new));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -27,6 +28,7 @@
@RequestMapping("/status/checkin-apps")
@Validated
@AllArgsConstructor
@Slf4j
public class AppStatusController {

private StatusService statusService;
Expand All @@ -37,6 +39,9 @@ public List<App> 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());
}
}
Expand Down

0 comments on commit 6ae7c6b

Please sign in to comment.