Skip to content

Commit fd58f03

Browse files
algolia-botmillotp
andcommitted
fix(ruby): handle unknown attributes in index_exists (#4231) (generated) [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent 3f5ceb5 commit fd58f03

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

clients/algoliasearch-client-ruby/lib/algolia/api/search_client.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3533,13 +3533,16 @@ def replace_all_objects(index_name, objects, batch_size = 1000, request_options
35333533
def index_exists?(index_name)
35343534
begin
35353535
get_settings(index_name)
3536-
rescue AlgoliaHttpError => e
3537-
return false if e.code == 404
3536+
rescue Exception => e
3537+
if e.is_a?(AlgoliaHttpError)
3538+
return false if e.code == 404
35383539

3539-
raise e
3540+
raise e
3541+
end
35403542
end
35413543

35423544
true
35433545
end
3546+
35443547
end
35453548
end

0 commit comments

Comments
 (0)