coreos/etcd — pull request #1601 by jonboulle (2014-11-04 20:53:35+00:00)
Title: client: return ErrNoEndpoint when none available

In certain cases (for example, if a cluster peer is accessible but it has no
members listed), the httpClusterClient could have an empty set of endpoints as
a result of the Sync. This means that its Do function could potentially return
a nil response and nil error, with catastrophic consequences for callers.

To be safe (particularly about this latter behaviour), this change errors in
both Sync and Do if no endpoints are available.