Project

General

Profile

Bug #9595

Better handle connection failures

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
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.
```

History

#1 Updated by David Davis over 7 years ago

  • Status changed from New to Assigned

#2 Updated by David Davis over 7 years ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF