fullcontact / fullcontact-api-ruby

A Ruby wrapper for the FullContact API
MIT License
82 stars 84 forks source link

Faraday::ConnectionFailed: execution expired when setting timeout #41

Open joevandyk opened 8 years ago

joevandyk commented 8 years ago

I'd expect a subclass of a Fullcontact Error to be returned if we can't connect, not a Faraday error.

We're passing these options along: { request: { timeout: 15, open_timeout: 5 }

/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/net/http.rb:879 in initialize
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/net/http.rb:879 in open
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/net/http.rb:879 in block in connect
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/timeout.rb:89 in block in timeout
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/timeout.rb:99 in call
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/timeout.rb:99 in timeout
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/net/http.rb:878 in connect
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/net/http.rb:863 in do_start
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/net/http.rb:852 in start
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/net/http.rb:1375 in request
/usr/local/tanga/ruby_2.2.0-gh-201503006-1/lib/ruby/2.2.0/net/http.rb:1133 in get
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:80 in perform_request
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40 in block in call
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:87 in with_net_http_connection
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32 in call
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/response.rb:8 in call
vendor/bundle/ruby/2.2.0/gems/faraday_middleware-0.10.0/lib/faraday_middleware/response_middleware.rb:30 in call
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/response.rb:8 in call
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/response.rb:8 in call
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/request/url_encoded.rb:15 in call
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139 in build_response
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377 in run_request
vendor/bundle/ruby/2.2.0/gems/faraday-0.9.2/lib/faraday/connection.rb:140 in get
vendor/bundle/ruby/2.2.0/gems/fullcontact-0.13.0/lib/fullcontact/request.rb:15 in request
vendor/bundle/ruby/2.2.0/gems/fullcontact-0.13.0/lib/fullcontact/request.rb:6 in get
vendor/bundle/ruby/2.2.0/gems/fullcontact-0.13.0/lib/fullcontact/client/person.rb:15 in person
vendor/bundle/ruby/2.2.0/gems/fullcontact-0.13.0/lib/fullcontact.rb:22 in method_missing
app/tanga_api/customers/profile.rb:33 in block in fetch_and_store_profile