I would like to rescue errors related to all connection errors using httpparty gem (reset by peer,timeout, etc..)
Something like:
begin
response = HTTParty.get('http://somewhere.url', http_proxyaddr: proxy_addr,http_proxyport: proxy_port, timeout: 10)
rescue HTTParty::Error => e
puts 'HttParty::Error '+ e.message
retry
rescue StandardError => e
puts 'StandardError '+ e.message
end