public RuntimeException wrapException(String message, Exception cause) {
        if (cause instanceof ClientException || cause instanceof ServerException) {
            return (RuntimeException) cause;
        }

        if (cause instanceof ConnectionRequestTimeoutException ||
                cause instanceof NoHttpResponseException ||
                cause instanceof ConnectTimeoutException ||
                cause instanceof ConnectException) {
            return new ConnectionInitiationException(message, cause);
        }

        return new ClientException(message, cause);
    }
Reads status line and if error tries to parse response body to get server error message.

@param httpResponse - HTTP response
@return
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java