fix(tls, client): added proper errors to client & schema to connect url; added localhost wildcard for self-signed setup
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user