Better error handling

I found a little bit confusing how low level network error (connection refused in my case) are dealt since it's pretty different from http errors. I figured out an explicit test and better documentation would improve the situation. Here it is.