-
Notifications
You must be signed in to change notification settings - Fork 2.2k
FINERACT-2320: Fix 403 error by returning false when Loan COB job is disabled #5291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
@Shivd131 Run './gradlew :fineract-provider:spotlessApply' to fix these violations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase, this fix is already in place
IOhacker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase
4b2ea1f to
d40284d
Compare
|
@IOhacker Thanks for the review. I have:
The build should be green now, but kindly let me know if there are further fixes required! |
IOhacker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the comment
d40284d to
8108047
Compare
|
@IOhacker I have removed the comment, thank you. |
IOhacker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Fixes FINERACT-2320.
The Issue:
When
fineract.job.loan-cob-enabledis set tofalse, the API endpoint/loans/is-catch-up-runningthrows aJobIsNotFoundOrNotEnabledException. This results in a403 Forbidden(or sometimes400 Bad Request) response, causing the "Manage Jobs" UI to display an error message unnecessarily.The Fix:
Modified
LoanCOBCatchUpApiResource.javato handle the empty ServiceOptionalgracefully. Instead of throwing an exception, the API now correctly returns200 OKwith a payload indicating the job is not running:{"catchUpRunning": false}.Verification:
export FINERACT_JOB_LOAN_COB_ENABLED=false.400/403.200 OK.Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!