more informative error message when connection fails