Improve error message on failed http connection