Handle errors properly

When an err is returned such as as unreachable host (etcd is down), the resp object will be null. Previously, this would throw a `Cannot read property 'headers' of undefined` expection, but not it should handle things gracefully.