fix(tls, client): added proper errors to client & schema to connect url; added localhost wildcard for self-signed setup

This commit is contained in:
hdbg
2026-03-24 20:08:42 +01:00
parent c0b08e84cc
commit 056ff3470b
6 changed files with 57 additions and 46 deletions

View File

@@ -3,6 +3,7 @@ use std::io::{self, Write};
use arbiter_client::ArbiterClient;
use arbiter_proto::{ClientMetadata, url::ArbiterUrl};
use tonic::ConnectError;
#[tokio::main]
async fn main() {
@@ -22,6 +23,8 @@ async fn main() {
return;
}
let url = match ArbiterUrl::try_from(input) {
Ok(url) => url,
Err(err) => {
@@ -30,6 +33,8 @@ async fn main() {
}
};
println!("{:#?}", url);
let metadata = ClientMetadata {
name: "arbiter-client test_connect".to_string(),
description: Some("Manual connection smoke test".to_string()),
@@ -38,6 +43,6 @@ async fn main() {
match ArbiterClient::connect(url, metadata).await {
Ok(_) => println!("Connected and authenticated successfully."),
Err(err) => eprintln!("Failed to connect: {err}"),
Err(err) => eprintln!("Failed to connect: {:#?}", err),
}
}