Skip to content

Commit 8108047

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ 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+
return loanCOBCatchUpServiceOp.map(LoanCOBCatchUpService::isCatchUpRunning).orElseGet(() -> new IsCatchUpRunningDTO(false, null));
9190
}
9291
}

0 commit comments

Comments
 (0)