You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "airajena (via GitHub)" <gi...@apache.org> on 2026/01/03 12:42:20 UTC

[PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

airajena opened a new pull request, #5283:
URL: https://github.com/apache/fineract/pull/5283

   ## Description
   Fixes the error "Job LOAN_COB is not found or it is disabled" that appears when navigating to Manage Jobs with LOAN_COB disabled.
   
   ## Root Cause
   When `fineract.job.loan-cob-enabled=false`, the `/api/v1/loans/is-catch-up-running` endpoint throws `JobIsNotFoundOrNotEnabledException`, which maps to HTTP 403 Forbidden.
   
   ## Fix
   Changed the `isCatchUpRunning()` method to return a default `IsCatchUpRunningDTO(false, null)` when the service is not available, instead of throwing an exception.
   
   **Before:**
   ```java
   .orElseThrow(() -> new JobIsNotFoundOrNotEnabledException(JobName.LOAN_COB.name()));
   ```
   
   **After:**
   ```java
   .orElse(new IsCatchUpRunningDTO(false, null));
   ```
   
   ## Related Issue
   Fixes FINERACT-2320


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #5283:
URL: https://github.com/apache/fineract/pull/5283#issuecomment-3753685067

   @airajena Please rebase this PR with latest `develop` branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #5283:
URL: https://github.com/apache/fineract/pull/5283#issuecomment-3725960266

   ```
       Test testPostInterestNotZero() FAILED (1.9s)
     
       java.lang.AssertionError: 1 expectation failed.
       Expected status code <200> but was <400>.
           at org.apache.fineract.integrationtests.SavingsInterestPostingTest.lambda$testPostInterestNotZero$4(SavingsInterestPostingTest.java:346)
   ```
   Please run:
   ```
   ./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on PR #5283:
URL: https://github.com/apache/fineract/pull/5283#issuecomment-3727800382

   > Test testPostInterestNotZero() FAILED (1.9s)
   >   
   >     java.lang.AssertionError: 1 expectation failed.
   >     Expected status code <200> but was <400>.
   >         at org.apache.fineract.integrationtests.SavingsInterestPostingTest.lambda$testPostInterestNotZero$4(SavingsInterestPostingTest.java:346)
   
   The test failures (testPostInterestNotZero) should be resolved since they were caused by being behind upstream.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #5283:
URL: https://github.com/apache/fineract/pull/5283#issuecomment-3727809005

   > > Test testPostInterestNotZero() FAILED (1.9s)
   > > ```
   > > java.lang.AssertionError: 1 expectation failed.
   > > Expected status code <200> but was <400>.
   > >     at org.apache.fineract.integrationtests.SavingsInterestPostingTest.lambda$testPostInterestNotZero$4(SavingsInterestPostingTest.java:346)
   > > ```
   > 
   > The test failures (testPostInterestNotZero) should be resolved since they were caused by being behind upstream.
   
   They might have been resolved. Can you rebase with latest develop branch? 
   
   Please let me know if it is still failing and i will take a look.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on PR #5283:
URL: https://github.com/apache/fineract/pull/5283#issuecomment-3747512258

   > Kindly check the failing build!
   
   Can you please share the details of the failing case, also  is there any way where I can see the details of failing case?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #5283:
URL: https://github.com/apache/fineract/pull/5283#issuecomment-3738410819

   ```
   * What went wrong:
   Execution failed for task ':fineract-provider:spotlessJavaCheck'.
   > The following files had format violations:
         src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java
             @@ -86,7 +86,6 @@
              ····@Produces({·MediaType.APPLICATION_JSON·})
   gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run-1767947855361.json
   
   [Incubating] Problems report is available at: file:///home/runner/work/fineract/fineract/build/reports/problems/problems-report.html
              ····@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)
             -················.orElse(new·IsCatchUpRunningDTO(false,·null));
             +········return·loanCOBCatchUpServiceOp.map(LoanCOBCatchUpService::isCatchUpRunning).orElse(new·IsCatchUpRunningDTO(false,·null));
              ····}
              }
     Run './gradlew :fineract-provider:spotlessApply' to fix these violations.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #5283:
URL: https://github.com/apache/fineract/pull/5283#issuecomment-3753687970

   Duplicate https://github.com/apache/fineract/pull/5291


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy closed pull request #5283: FINERACT-2320: Return false instead of throwing exception when LOAN_COB is disabled
URL: https://github.com/apache/fineract/pull/5283


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org