Skip to content

Commit 01bf4c9

Browse files
authored
retry on transient wrapped httpi errors (#566)
* add httpclient timeout to backoff since it is the most preferred by httpi * retry http client error subclasses since we use include? instead of is_a? on these * retry on transient wrapped httpi errors too
1 parent 4a3fff4 commit 01bf4c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/netsuite/utilities.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ def backoff(options = {})
125125
exceptions_to_retry << OpenSSL::SSL::SSLErrorWaitReadable if defined?(OpenSSL::SSL::SSLErrorWaitReadable)
126126

127127
# depends on the http library chosen
128+
exceptions_to_retry << HTTPI::SSLError if defined?(HTTPI::SSLError)
129+
exceptions_to_retry << HTTPI::TimeoutError if defined?(HTTPI::TimeoutError)
128130
exceptions_to_retry << HTTPClient::TimeoutError if defined?(HTTPClient::TimeoutError)
129131
exceptions_to_retry << HTTPClient::ConnectTimeoutError if defined?(HTTPClient::ConnectTimeoutError)
130132
exceptions_to_retry << HTTPClient::ReceiveTimeoutError if defined?(HTTPClient::ReceiveTimeoutError)

0 commit comments

Comments
 (0)