lib/elasticsearch/api/actions/indices/exists_index_template.rb in elasticsearch-api-7.16.0 vs lib/elasticsearch/api/actions/indices/exists_index_template.rb in elasticsearch-api-7.16.1

- old
+ new

@@ -41,13 +41,12 @@ method = Elasticsearch::API::HTTP_HEAD path = "_index_template/#{Utils.__listify(_name)}" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil - if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body } - else - perform_request(method, path, params, body, headers).body + + Utils.__rescue_from_not_found do + perform_request(method, path, params, body, headers).status == 200 ? true : false end end alias_method :exists_index_template?, :exists_index_template