[ https://issues.apache.org/jira/browse/SLING-4416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14528526#comment-14528526 ]
Georg Henzler commented on SLING-4416: -------------------------------------- >From my my project's requirements it doesn't matter if the state is CRITICAL >or HEALTH_CHECK_ERROR - they are both treated the same => as CRITICAL. [~bdelacretaz] I think you came initially up with the result HEALTH_CHECK_ERROR, what exactly did you have in mind when you introduced it? To me it seems the best status to be returned for the case a health check throws an exception. Changing it now could cause unexpected behaviour for some people, but I think most people have treated HEALTH_CHECK_ERROR as critical anyway. For the ones that ignored it up to now it would mean that potentially critical situations are not reported as critical anymore, something that could be acceptable? > Improve HC Message/Status if a HC implementation throws an exception > -------------------------------------------------------------------- > > Key: SLING-4416 > URL: https://issues.apache.org/jira/browse/SLING-4416 > Project: Sling > Issue Type: Improvement > Components: Health Check > Affects Versions: Health Check Core 1.1.2 > Reporter: Georg Henzler > Assignee: Bertrand Delacretaz > Fix For: Health Check Core 1.2.4 > > Attachments: SLING-4416-Improved-Exception-Handling.patch > > > At the moment, if a HC throws an exception, both status and and message are > not ideal: > {code} > CRITICAL Exception during execution of > org.apache.sling.hc.core.impl.executor.HealthCheckFuture$1@688ec41b: > java.lang.NullPointerException > {code} > The attached patch changes the behaviour to the following: > {code} > HEALTH_CHECK_ERROR Exception during execution of 'My HC Name': > java.lang.NullPointerException > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)