Project

General

Profile

Actions

Bug #9595

closed

Better handle connection failures

Added by David Davis over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.
```

Actions #1

Updated by David Davis over 8 years ago

  • Status changed from New to Assigned
Actions #2

Updated by David Davis over 8 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF