Bug #9595
closedBetter handle connection failures
Description
From https://github.com/theforeman/foreman-docker/pull/90#issuecomment-76587635:
```
When the docker service is up, it works pretty well. However we should handle better what happens when the service is down. Currently:
if the service was never started and is off - 500 code: Excon::Errors::SocketError: No such file or directory - connect(2) (Errno::ENOENT)
if the service was started at some point then turned off - 500 code: `Excon::Errors::SocketError: Connection refused - connect(2) (Errno::ECONNREFUSED)
if the service is up - 200 code: everything :ok:
Can you fix that and I'll merge? It kind of breaks my heart but this method is one of the few ocassions where a catch-all rescue => e seems fine, as Errno exceptions are notoriously unreliable and hard to group.
```