diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java index a0b17cfe89..b8ed5b39c0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java @@ -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); } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRefundTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRefundTest.java index 91578eb624..b9ece7fb99 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRefundTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRefundTest.java @@ -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 optMerchantIssuedTransaction = loanDetails.getTransactions().stream()