Skip to content

Commit d40284d

Browse files
Shiv DeshpandeShivd131
authored andcommitted
Fix(FINERACT-2320): Return false instead of 403 when Loan COB job is disabled
1 parent 5c04216 commit d40284d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public Response executeLoanCOBCatchUp() {
8686
@Produces({ MediaType.APPLICATION_JSON })
8787
@Operation(summary = "Retrieves whether Loan COB catch up is running", description = "Retrieves whether Loan COB catch up is running, and the current execution date if it is running.")
8888
public IsCatchUpRunningDTO isCatchUpRunning() {
89-
return loanCOBCatchUpServiceOp.map(LoanCOBCatchUpService::isCatchUpRunning)
90-
.orElseThrow(() -> new JobIsNotFoundOrNotEnabledException(JobName.LOAN_COB.name()));
89+
// Fix for FINERACT-2320: If job is disabled, return false/null instead of throwing 403 Exception
90+
return loanCOBCatchUpServiceOp.map(LoanCOBCatchUpService::isCatchUpRunning).orElseGet(() -> new IsCatchUpRunningDTO(false, null));
9191
}
9292
}

0 commit comments

Comments
 (0)