Wrap socket connectivity errors

To ensure we aren't raising exceptions that aren't nicely wrapped.