Raise a better error message in case connection to socket is refused