code: protected boolean isHostUnavailableException(Throwable throwable, Set<Throwable> path) {
      // Check if the exception is an IOException and check if the
      // message indicates an end of stream on a Connection.
      if ( IOException.class.isInstance(throwable) && throwable.getMessage().contains("unexpected end of stream on") ) {
        return true;
      }
      // we need to check our recursion path to avoid infinite recursion if a
      // getCause() pointed to itself or an ancestor
      if ( throwable.getCause() != null && !path.contains(throwable.getCause()) ) {
        path.add(throwable.getCause());
        boolean isCauseHostUnavailableException = isHostUnavailableException(throwable.getCause(), path);
        if ( isCauseHostUnavailableException == true )
          return true;
      }
      return false;
    }
docs: appropriate exception for no response from the server