handle all errors coming from an attempt to connect
Merge pull request #95 from alfredodeza/6387

handle all errors coming from an attempt to connect