Seth Vargo · Dec 21, 2013
Handle Faraday::Error::ConnectionFailed with middleware
0Sign in to vote or save
This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.
Faraday is a really nice, middleware-based HTTP client for Ruby. For simple libraries, I recommend HTTParty, but Faraday is a really awesome solution when you need full control over the complete stack. However, Faraday has one feature/flaw that I have found. If Faraday is unable to connect to a server, it throws a really nasty error. I whipped up a tiny middleware to handle this error: class…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.