From b8bf14c4a754d4d84643b2c1b1af5b915e788bd2 Mon Sep 17 00:00:00 2001 From: George Nash Date: Wed, 12 Jun 2024 09:11:59 +0100 Subject: [PATCH] added extra logging of bad status codes --- .../memberportal/service/member/client/SalesforceClient.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/member-service/src/main/java/org/orcid/memberportal/service/member/client/SalesforceClient.java b/member-service/src/main/java/org/orcid/memberportal/service/member/client/SalesforceClient.java index 88bbc89e0..be5879752 100644 --- a/member-service/src/main/java/org/orcid/memberportal/service/member/client/SalesforceClient.java +++ b/member-service/src/main/java/org/orcid/memberportal/service/member/client/SalesforceClient.java @@ -117,6 +117,7 @@ private Boolean updateSFPublicMemberDetails(MemberUpdateData memberUpdateData) { try (CloseableHttpResponse response = httpClient.execute(httpPut)) { if (response.getStatusLine().getStatusCode() != Status.OK.getStatusCode()) { LOG.warn("Received non-200 response from salesforce client for salesforce id {}", memberUpdateData.getSalesforceId()); + LOG.info("Response code is {}", response.getStatusLine().getStatusCode()); logErrorBody(response); EntityUtils.consume(response.getEntity()); } else { @@ -141,6 +142,7 @@ private MemberDetails getSFMemberDetails(String salesforceId) { try (CloseableHttpResponse response = httpClient.execute(httpGet)) { if (response.getStatusLine().getStatusCode() != Status.OK.getStatusCode()) { LOG.warn("Received non-200 response from salesforce client for salesforce id {}", salesforceId); + LOG.info("Response code is {}", response.getStatusLine().getStatusCode()); logErrorBody(response); EntityUtils.consume(response.getEntity()); } else { @@ -214,6 +216,7 @@ private ConsortiumLeadDetails getSFConsortiumLeadDetails(String salesforceId) { try (CloseableHttpResponse response = httpClient.execute(httpGet)) { if (response.getStatusLine().getStatusCode() != Status.OK.getStatusCode()) { LOG.warn("Received non-200 response from salesforce client for salesforce id {}", salesforceId); + LOG.info("response code is {}", response.getStatusLine().getStatusCode()); logErrorBody(response); EntityUtils.consume(response.getEntity()); } else {