Source:
<code>protected AmazonBillResultsDTO processRootAccount(String masterAccountNumber, String masterAccountName, DefaultKfsAccountForAwsResultWrapper defaultAccountWrapper) { AmazonBillResultsDTO resultsDTO = new AmazonBillResultsDTO(); resultsDTO.masterAccountName = masterAccountName; resultsDTO.masterAccountNumber = masterAccountNumber; boolean masterAccountSuccess = true; CloudCheckrWrapper cloudCheckrWrapper = null; try { cloudCheckrWrapper = cloudCheckrService.getCloudCheckrWrapper(findStartDate(), findEndDate(), masterAccountName); } catch (URISyntaxException | IOException e) { <START> LOG.error("processRootAccount, unable to call cloudcheckr endpoint. This exception may print the URL which has an access token in it, so not logging the exception on purpose."); <END> masterAccountSuccess = false; } if (ObjectUtils.isNotNull(cloudCheckrWrapper) && ObjectUtils.isNotNull(defaultAccountWrapper)) { AccountingXmlDocumentListWrapper documentWrapper = buildAccountingXmlDocumentListWrapper(cloudCheckrWrapper, defaultAccountWrapper, masterAccountNumber, masterAccountName, resultsDTO); LOG.info("generateDistributionOfIncomeDocumentsFromAWSService, built documentWrapper: " + documentWrapper); masterAccountSuccess &= generateXML(documentWrapper, masterAccountName); } else { masterAccountSuccess = false; LOG.error("generateDistributionOfIncomeDocumentsFromAWSService, cloudCheckrWrapper or defaultAccountWrapper was not built, can not generate DIs"); } resultsDTO.successfullyProcessed = masterAccountSuccess; return resultsDTO; }</code><technical_language>Is enough logging in other places identify error? "getCloudCheckrWrapper" method logging information server's response, if code encountering error. If changing this logging logic done in a follow-up story instead, me</technical_language>

Target:
protected AmazonBillResultsDTO processRootAccount(String masterAccountNumber, String masterAccountName, DefaultKfsAccountForAwsResultWrapper defaultAccountWrapper) { AmazonBillResultsDTO resultsDTO = new AmazonBillResultsDTO(); resultsDTO.masterAccountName = masterAccountName; resultsDTO.masterAccountNumber = masterAccountNumber; boolean masterAccountSuccess = true; CloudCheckrWrapper cloudCheckrWrapper = null; try { cloudCheckrWrapper = cloudCheckrService.getCloudCheckrWrapper(findStartDate(), findEndDate(), masterAccountName); } catch (URISyntaxException | IOException e) { StringBuilder errorMessageBuilder = new StringBuilder("processRootAccount, unable to call cloudcheckr endpoint."); errorMessageBuilder.append("This exception may print the URL which has an access token in it, so not logging the exception on purpose."); errorMessageBuilder.append(" startDate: ").append(findStartDate()); errorMessageBuilder.append(" endDate: ").append(findEndDate()); errorMessageBuilder.append(" masterAccountName: ").append(masterAccountName); LOG.error(errorMessageBuilder); masterAccountSuccess = false; } if (ObjectUtils.isNotNull(cloudCheckrWrapper) && ObjectUtils.isNotNull(defaultAccountWrapper)) { AccountingXmlDocumentListWrapper documentWrapper = buildAccountingXmlDocumentListWrapper(cloudCheckrWrapper, defaultAccountWrapper, masterAccountNumber, masterAccountName, resultsDTO); LOG.info("processRootAccount, built documentWrapper: " + documentWrapper); masterAccountSuccess &= generateXML(documentWrapper, masterAccountName); } else { masterAccountSuccess = false; LOG.error("processRootAccount, cloudCheckrWrapper or defaultAccountWrapper was not built, can not generate DIs"); } resultsDTO.successfullyProcessed = masterAccountSuccess; return resultsDTO; }