Send error code to 403 in Loan Fraud on error
This commit is contained in:
committed by
Arnold Gálovics
parent
6cb741a7a2
commit
7c6e85be10
+1
-1
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user