FINERACT-1981: Reverse Interest Refund transaction not allowed directly with 403 error

This commit is contained in:
Jose Alberto Hernandez
2024-11-29 12:28:37 +01:00
committed by Adam Saghy
parent ff5e993b16
commit 8d25b0c765
2 changed files with 2 additions and 2 deletions
@@ -1426,7 +1426,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
}
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);
}
@@ -1240,7 +1240,7 @@ public class LoanInterestRefundTest extends BaseLoanIntegrationTest {
() -> 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()