loopback-datasource-juggler icon indicating copy to clipboard operation
loopback-datasource-juggler copied to clipboard

fix: add error handling in case of unvailable cache server

Open aaqilniz opened this issue 1 year ago • 4 comments

In case of an unavailable datasource server (like the Redis server), the app crashes.

With this PR, the users can add an option in the datasource config named catchFailure and set its value to true. This would prevent the app from crashing and show the connection failure error in the console.

Checklist

  • [x] Sign off your commits with DCO (Developer Certificate of Origin)
  • [x] npm test passes on your machine
  • [ ] New tests added or existing tests modified to cover all changes
  • [x] Code conforms with the style guide
  • [x] Commit messages are following our guidelines

aaqilniz avatar Nov 24 '23 17:11 aaqilniz

Pull Request Test Coverage Report for Build 8128945264

Details

  • 0 of 5 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 84.762%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/datasource.js 0 5 0.0%
<!-- Total: 0 5
Totals Coverage Status
Change from base Build 8084044252: -0.04%
Covered Lines: 7267
Relevant Lines: 8268

💛 - Coveralls

coveralls avatar Nov 24 '23 17:11 coveralls

Hi, @samarpanB. I've made the changes to be optional as you suggested. Can you please confirm if we can move forward with the PR?

aaqilniz avatar Feb 07 '24 15:02 aaqilniz

LGTM, but I would like to get one more approval on this before merging.

samarpanB avatar Mar 03 '24 16:03 samarpanB

Hi, @dhmlau. Can you have a look at this PR please?

aaqilniz avatar Mar 04 '24 11:03 aaqilniz

Any ideas when this will get merged in?

patrioticcow avatar Mar 26 '24 17:03 patrioticcow