Skip to content

Commit 67ba2d2

Browse files
committed
safer
1 parent d90bfa7 commit 67ba2d2

File tree

1 file changed

+1
-1
lines changed
  • clients/algoliasearch-client-ruby/lib/algolia/transport

1 file changed

+1
-1
lines changed

clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def request(call_type, method, path, body, opts = {})
7070
)
7171
if outcome == FAILURE
7272
# handle HTML error
73-
if response.headers["content-type"].include?("text/html")
73+
if response.headers["content-type"]&.include?("text/html")
7474
raise Algolia::AlgoliaHttpError.new(response.status, response.reason_phrase)
7575
end
7676

0 commit comments

Comments
 (0)