diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java index 7a928ff209e..53ecff7dd4d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java @@ -86,7 +86,6 @@ public Response executeLoanCOBCatchUp() { @Produces({ MediaType.APPLICATION_JSON }) @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.") public IsCatchUpRunningDTO isCatchUpRunning() { - return loanCOBCatchUpServiceOp.map(LoanCOBCatchUpService::isCatchUpRunning) - .orElseThrow(() -> new JobIsNotFoundOrNotEnabledException(JobName.LOAN_COB.name())); + return loanCOBCatchUpServiceOp.map(LoanCOBCatchUpService::isCatchUpRunning).orElseGet(() -> new IsCatchUpRunningDTO(false, null)); } }