{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/3452","repository_url":"https://api.github.com/repos/elastic/elasticsearch-net","labels_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/3452/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/3452/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/3452/events","html_url":"https://github.com/elastic/elasticsearch-net/issues/3452","id":368269051,"node_id":"MDU6SXNzdWUzNjgyNjkwNTE=","number":3452,"title":"Health enum default of 'Green' is counter-intuitive for error scenarios","user":{"login":"lakario","id":120187,"node_id":"MDQ6VXNlcjEyMDE4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/120187?v=4","gravatar_id":"","url":"https://api.github.com/users/lakario","html_url":"https://github.com/lakario","followers_url":"https://api.github.com/users/lakario/followers","following_url":"https://api.github.com/users/lakario/following{/other_user}","gists_url":"https://api.github.com/users/lakario/gists{/gist_id}","starred_url":"https://api.github.com/users/lakario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakario/subscriptions","organizations_url":"https://api.github.com/users/lakario/orgs","repos_url":"https://api.github.com/users/lakario/repos","events_url":"https://api.github.com/users/lakario/events{/privacy}","received_events_url":"https://api.github.com/users/lakario/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-09T15:28:12Z","updated_at":"2018-10-16T00:13:40Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nGitHub is reserved for bug reports and feature requests. The best place\r\nto ask a general question is at the Elastic Discourse forums at\r\nhttps://discuss.elastic.co. If you are in fact posting a bug report or\r\na feature request, please include one and only one of the below blocks\r\nin your new issue.\r\n-->\r\n\r\n<!--\r\nIf you are filing a bug report, please remove the below feature\r\nrequest block and provide responses for all of the below items.\r\n-->\r\n\r\n**NEST/Elasticsearch.Net version**:\r\n6.3.1\r\n\r\n**Elasticsearch version**:\r\nAny\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\n\r\nWhen invoking the `ClusterHealth()` and `ClusterHealthAsync()` methods with an invalid or unconnectable Elasticsearch endpoint, the `IClusterHealthResponse.Status` enum property remains assigned the value of `Green`. Given that the call failed, the Status was never retrieved and thus returning `Health.Green`, here is at best counter-intuitive.  This `Status` property should either be nullable, or the enum should have another zero state to represent that the value was not retrieved. \r\n\r\nIdeally, `Green` should not be the default value for the `Health` enum.\r\n\r\n**Steps to reproduce**:\r\n 1. Configure an `ElasticClient` with an invalid or unreachable cluster\r\n 2. Invoke `IElasticClient.ClusterHealthyAsync()`\r\n 3. Examine `IClusterHealthResponse.Status`\r\n\r\n<!--\r\nIf you are filing a feature request, please remove the above bug\r\nreport block and provide responses for all of the below items.\r\n-->\r\n\r\n**Describe the feature**:\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/comments/430057051","html_url":"https://github.com/elastic/elasticsearch-net/issues/3452#issuecomment-430057051","issue_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/3452","id":430057051,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDA1NzA1MQ==","user":{"login":"russcam","id":208231,"node_id":"MDQ6VXNlcjIwODIzMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/208231?v=4","gravatar_id":"","url":"https://api.github.com/users/russcam","html_url":"https://github.com/russcam","followers_url":"https://api.github.com/users/russcam/followers","following_url":"https://api.github.com/users/russcam/following{/other_user}","gists_url":"https://api.github.com/users/russcam/gists{/gist_id}","starred_url":"https://api.github.com/users/russcam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russcam/subscriptions","organizations_url":"https://api.github.com/users/russcam/orgs","repos_url":"https://api.github.com/users/russcam/repos","events_url":"https://api.github.com/users/russcam/events{/privacy}","received_events_url":"https://api.github.com/users/russcam/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T00:13:40Z","updated_at":"2018-10-16T00:13:40Z","author_association":"CONTRIBUTOR","body":"There would always be a value for status in the response as far as I can see, as it maps to the `ClusterHealthStatus` enum in Elasticsearch:\r\n\r\nhttps://github.com/elastic/elasticsearch/blob/5be79ed02ceb9fbe6c867a888ada2af8d53fd8d2/core/src/main/java/org/elasticsearch/cluster/health/ClusterHealthStatus.java#L32-L35\r\n\r\nand\r\n\r\nhttps://github.com/elastic/elasticsearch/blob/282ab0d89ec5789d1020247b6b79b5578c843c0f/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java#L236"}}
{"actor":{"display_login":"russcam"}}