tsuru/go-gandalfclient — pull request #5 by msabramo (2014-12-31 18:12:57+00:00)
Title: Nicer error when fail to connect to gandalf

Before:

$ http http://127.0.0.1:8080/healthcheck/ Authorization:"Bearer $(<~/.tsuru_token)"
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
Date: Wed, 31 Dec 2014 17:42:14 GMT
Supported-Crane: 0.6.0
Supported-Tsuru: 0.14.0
Supported-Tsuru-Admin: 0.8.1
Transfer-Encoding: chunked

Failed to connect to Gandalf server, it's probably down.

After:

$ http http://127.0.0.1:8080/healthcheck/ Authorization:"Bearer $(<~/.tsuru_token)"
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
Date: Wed, 31 Dec 2014 17:47:00 GMT
Supported-Crane: 0.6.0
Supported-Tsuru: 0.14.0
Supported-Tsuru-Admin: 0.8.1
Transfer-Encoding: chunked

Failed to connect to Gandalf server (http://127.0.0.1:8000) - Get http://127.0.0.1:8000/healthcheck: dial tcp 127.0.0.1:8000: connection refused