Skip to content

[API] Adds ignore 404 parameter to query_rules.delete_ruleset #2635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG-9.x.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# CHANGELOG 9.x
## Ruby version

Ruby 3.2 and up are tested and supported. At the time of release, we're testingb

We follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/).

## Gem

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,19 @@ def delete_ruleset(arguments = {})

method = Elasticsearch::API::HTTP_DELETE
path = "_query_rules/#{Utils.listify(_ruleset_id)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
if Array(arguments[:ignore]).include?(404)
Utils.rescue_from_not_found do
Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
else
Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch-api/lib/elasticsearch/api/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
module Elasticsearch
module API
VERSION = '9.0.0'.freeze
ES_SPECIFICATION_COMMIT = '55d1444f19ce33e5a7a318e51ccc638a7901959c'.freeze
ES_SPECIFICATION_COMMIT = '1403bac9354d232024184bd992ecc76aaa9e68fa'.freeze
end
end