How should isHealthy behave on errors
See original GitHub issueProblem
isHealthy only returns true or throws an error.
How it works
As of today the isHealthy method returns true if the request and response are successful. In case any of request or response fails, the error is thrown and the user has to catch it.
Suggestion
As of this PR #635 EDIT There are three possible scenarios:
- Request and response are successful:
isHealthyreturnstrue - Response returns an error with error code
maintenance:isHealthyreturns - Response and or response fails (not
maintenanceas errorCode):isHealthythrows an error
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Understanding Behaviors and Errors
In a just culture all types of error hold equal importance because they are seen as an opportunity for the organization to learn...
Read more >Shaping a Reliable Culture of Safety: Our Error Prevention ...
▫All of us make mistakes/errors. ▫When people in healthcare make mistakes, it can result in great inconvenience, harm or death.
Read more >Medical Error Reduction and Prevention - StatPearls - NCBI
Preventable medical errors contribute substantially to healthcare costs, including higher health insurance costs per person expenses. Only by ...
Read more >Learning from Errors | Annual Review of Psychology
Interestingly, the beneficial effects are particularly salient when individuals strongly believe that their error is correct: Errors committed with high ...
Read more >Preventing Medical Errors: Best Practices for Mental Health ...
Are you a psychologist looking for our medical errors course? ... Health Insurance Portability Accountability Act. Confidentiality.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

FYI, this MeiliSearch’s issue https://github.com/meilisearch/MeiliSearch/issues/940 changes the not-idomatic behavior of
/healthroute: it would always return a204if you success to reach MeiliSearch via this route (if I understand well). It would be the job of the SDK to returntrueif you get the204andfalseif you don’t get anything at all because the MeiliSearch’s server is unreachable.Edit: FYI, the changes about this route has been merged and will be present in the next release at the beginning of November.
In the pr of @neupauer when MeiliSearch server is unreachable an error is thrown, like it is now.
falseonly appeared when we were inmaintenance. But this is not possible anymore, so we should never expect afalse.Unless we decide that the user should not be aware of why the server is not healthy and just return
false?