Skip to content

Commit 3f5ceb5

Browse files
authored
fix(ruby): handle unknown attributes in index_exists (#4231)
1 parent 6fb57f9 commit 3f5ceb5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

templates/ruby/search_helpers.mustache

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,13 @@ end
396396
def index_exists?(index_name)
397397
begin
398398
get_settings(index_name)
399-
rescue AlgoliaHttpError => e
400-
return false if e.code == 404
399+
rescue Exception => e
400+
if e.is_a?(AlgoliaHttpError)
401+
return false if e.code == 404
401402

402-
raise e
403+
raise e
404+
end
403405
end
404406

405407
true
406-
end
408+
end

0 commit comments

Comments
 (0)