Skip to content

Commit 4b3441a

Browse files
committed
Retry on socket errors
1 parent 17dc8f0 commit 4b3441a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/typesense/api_call.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def perform_request(method, endpoint, options = {})
8484

8585
exception_message = (response_object.parsed_response && response_object.parsed_response['message']) || 'Error'
8686
raise custom_exception_klass_for(response_object.response), exception_message
87-
rescue Net::ReadTimeout, Net::OpenTimeout,
87+
rescue SocketError, Net::ReadTimeout, Net::OpenTimeout,
8888
EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
8989
Errno::EINVAL, Errno::ENETDOWN, Errno::ENETUNREACH, Errno::ENETRESET, Errno::ECONNABORTED, Errno::ECONNRESET,
9090
Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTDOWN, Errno::EHOSTUNREACH,

lib/typesense/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Typesense
4-
VERSION = '0.5.3'
4+
VERSION = '0.5.4'
55
end

0 commit comments

Comments
 (0)