This is an automated email from the ASF dual-hosted git repository.

arnold pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7c6e85be1 Send error code to 403 in Loan Fraud on error
7c6e85be1 is described below

commit 7c6e85be1026b352b4e895065079c12b9074033e
Author: Jose Alberto Hernandez <[email protected]>
AuthorDate: Tue Oct 25 18:04:59 2022 -0500

    Send error code to 403 in Loan Fraud on error
---
 .../loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java  | 2 +-
 .../java/org/apache/fineract/integrationtests/LoanAccountFraudTest.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 a489e10b6..b8ebd1293 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
@@ -3312,7 +3312,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl 
implements LoanWritePlatf
         final Map<String, Object> changes = new LinkedHashMap<>();
 
         if (!loan.isOpen()) {
-            throw new 
PlatformServiceUnavailableException("error.msg.loan.mark.as.fraud.not.allowed",
+            throw new 
GeneralPlatformDomainRuleException("error.msg.loan.mark.as.fraud.not.allowed",
                     "Loan Id: " + loanId + " mark as fraud is not allowed as 
loan status is not active", loan.getStatus().getCode());
         }
 
diff --git 
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountFraudTest.java
 
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountFraudTest.java
index 73d5ff71d..30d1c5c1c 100644
--- 
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountFraudTest.java
+++ 
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountFraudTest.java
@@ -57,7 +57,7 @@ public class LoanAccountFraudTest {
         this.requestSpec = new 
RequestSpecBuilder().setContentType(ContentType.JSON).build();
         this.requestSpec.header("Authorization", "Basic " + 
Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
         this.responseSpec = new 
ResponseSpecBuilder().expectStatusCode(200).build();
-        this.responseSpecError = new 
ResponseSpecBuilder().expectStatusCode(503).build();
+        this.responseSpecError = new 
ResponseSpecBuilder().expectStatusCode(403).build();
         this.loanTransactionHelper = new 
LoanTransactionHelper(this.requestSpec, this.responseSpec);
 
         this.todaysDate = Utils.getLocalDateOfTenant();

Reply via email to