lib/elasticsearch/api/actions/indices/delete_template.rb in elasticsearch-api-1.0.9 vs lib/elasticsearch/api/actions/indices/delete_template.rb in elasticsearch-api-1.0.10

- old
+ new

@@ -26,15 +26,11 @@ path = Utils.__pathify '_template', Utils.__escape(arguments[:name]) params = Utils.__validate_and_extract_params arguments, valid_params body = nil - perform_request(method, path, params, body).body - - rescue Exception => e - # NOTE: Use exception name, not full class in Elasticsearch::Client to allow client plugability - if Array(arguments[:ignore]).include?(404) && e.class.to_s =~ /NotFound/; false - else raise(e) + Utils.__rescue_from_not_found do + perform_request(method, path, params, body).body end end end end end