Skip to content

Commit

Permalink
FINERACT-1981: Reverse Interest Refund transaction not allowed direct…
Browse files Browse the repository at this point in the history
…ly with 403 error
  • Loading branch information
Jose Alberto Hernandez authored and adamsaghy committed Nov 29, 2024
1 parent ff5e993 commit 8d25b0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ public CommandProcessingResult adjustLoanTransaction(final Long loanId, final Lo
}

if (transactionToAdjust.isInterestRefund()) {
throw new PlatformServiceUnavailableException("error.msg.loan.transaction.update.not.allowed",
throw new GeneralPlatformDomainRuleException("error.msg.loan.transaction.update.not.allowed",
"Interest refund transaction: " + transactionId + " cannot be reversed or adjusted directly", transactionId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ public void verifyUC19() {
() -> loanTransactionHelper.reverseLoanTransaction(loanId, interestRefundTransactionId,
new PostLoansLoanIdTransactionsTransactionIdRequest().dateFormat(DATETIME_PATTERN)
.transactionDate("22 January 2021").transactionAmount(0.0).locale("en")));
assertEquals(503, exception.getResponse().code());
assertEquals(403, exception.getResponse().code());
assertTrue(exception.getMessage().contains("error.msg.loan.transaction.update.not.allowed"));

Optional<GetLoansLoanIdTransactions> optMerchantIssuedTransaction = loanDetails.getTransactions().stream()
Expand Down

0 comments on commit 8d25b0c

Please sign in to comment.