From 0d5ff316649b4b086e91980a19dc2ab27226f2a7 Mon Sep 17 00:00:00 2001 From: George Nash Date: Thu, 18 Jan 2024 11:30:10 +0000 Subject: [PATCH] added logging for members not found --- .../service/member/web/rest/MemberResource.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/member-service/src/main/java/org/orcid/memberportal/service/member/web/rest/MemberResource.java b/member-service/src/main/java/org/orcid/memberportal/service/member/web/rest/MemberResource.java index c12ec9ac3..de2d459a4 100644 --- a/member-service/src/main/java/org/orcid/memberportal/service/member/web/rest/MemberResource.java +++ b/member-service/src/main/java/org/orcid/memberportal/service/member/web/rest/MemberResource.java @@ -311,7 +311,11 @@ public ResponseEntity> getMembersList() { @GetMapping("/members/{id}") public ResponseEntity getMember(@PathVariable String id) { LOG.debug("REST request to get Member : {}", id); - Optional member = memberService.getMember(id); + Optional membermember-service/src/main/java/org/orcid/memberportal/service/member/web/rest/MemberResource.java + = memberService.getMember(id); + if (!member.isPresent()) { + LOG.warn("Can't find member with id {}", id); + } return ResponseUtil.wrapOrNotFound(member); }