better handling connect errors such as econnrefused