adamsaghy commented on code in PR #3859:
URL: https://github.com/apache/fineract/pull/3859#discussion_r1560640556
##########
fineract-investor/src/main/java/org/apache/fineract/investor/cob/loan/LoanAccountOwnerTransferBusinessStep.java:
##########
@@ -85,7 +87,13 @@ public Loan execute(Loan loan) {
if (ExternalTransferStatus.PENDING.equals(transfer.getStatus())) {
handleSale(loan, settlementDate, transfer);
} else if
(ExternalTransferStatus.BUYBACK.equals(transfer.getStatus())) {
- handleBuyback(loan, settlementDate, transfer);
+ try {
+ handleBuyback(loan, settlementDate, transfer);
+ } catch (ExternalAssetOwnerTransferNotFoundException e) {
+ log.error(e.getMessage());
Review Comment:
I would not use try catch for this. Please consider moving this logging and
entry creation back to the `handleBuyback` method and instead of throwing an
error, just execute these.
Also please dont forget you need send business events from the CANCELLED
status change too!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]