Skip to content

Commit

Permalink
added extra logging of bad status codes
Browse files Browse the repository at this point in the history
  • Loading branch information
bobcaprice committed Jun 12, 2024
1 parent 995bd2d commit b8bf14c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b8bf14c

Please sign in to comment.