From 9b52376e7afeb9a377c8186ae7cb14633a2063d4 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 30 Nov 2024 12:22:44 +0100 Subject: [PATCH] feat: more error logging Signed-off-by: kjuulh --- crates/churn/src/agent/grpc_client.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/churn/src/agent/grpc_client.rs b/crates/churn/src/agent/grpc_client.rs index c988f25..be9639a 100644 --- a/crates/churn/src/agent/grpc_client.rs +++ b/crates/churn/src/agent/grpc_client.rs @@ -67,13 +67,16 @@ impl GrpcClient { namespace: namespace.into(), id: id.map(|i| i.into()), }) - .await?; + .await + .inspect_err(|e| tracing::warn!("failed to establish a connection: {}", e))?; tracing::debug!("setup stream: {}", namespace); let mut inner = resp.into_inner(); while let Ok(Some(message)) = inner.message().await { tracing::debug!("received message: {}", namespace); - exec.execute(message).await?; + exec.execute(message) + .await + .inspect_err(|e| tracing::warn!("failed to handle message: {}", e))?; } Ok(())