Permalink
Browse files

Retrying on Swiftype::UnexpectedHTTPException

  • Loading branch information...
1 parent 9ee739f commit 355befe2240115e0ba3c2fba93a631c13b0bf6b7 @gabriel committed Mar 26, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/swiftype/request.rb
View
@@ -40,7 +40,8 @@ def request(method, path, params, options)
end
options[:raw] ? response : response.body
- rescue Errno::ETIMEDOUT, Faraday::Error::TimeoutError, Faraday::Error::ConnectionFailed => e
+ rescue Errno::ETIMEDOUT, Faraday::Error::TimeoutError, Faraday::Error::ConnectionFailed,
+ Swiftype::UnexpectedHTTPException => e
if retries > 0
retries -= 1
retry

0 comments on commit 355befe

Please sign in to comment.