clickhouse.rs icon indicating copy to clipboard operation
clickhouse.rs copied to clipboard

Make error message more helpful when tls feature is not enabled

Open stepancheg opened this issue 6 months ago • 0 comments

        let client = clickhouse::Client::default()
            .with_url("https://xxx.us-east-1.aws.clickhouse.cloud")
            .with_user("default")
            .with_password("XXX");

        let mut insert = client.insert("events").unwrap();
        insert.write(&EventsRow {
            ts: Utc::now(),
        }).await.unwrap();
        insert.end().await.unwrap();

Works fine with rustls-tls feature enabled, but without it it fails with unhelpful error message:

Network(hyper_util::client::legacy::Error(Connect, "invalid URL, scheme is not http"))

Instead it should return error like

TLS is not support in clickhouse client, enable rustls-tls or native-tls feature.

Using version 0.13.2.

stepancheg avatar May 04 '25 22:05 stepancheg