feat: more error logging
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-11-30 12:22:44 +01:00
parent 7b222af1dd
commit 9b52376e7a
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA

View File

@ -67,13 +67,16 @@ impl GrpcClient {
namespace: namespace.into(), namespace: namespace.into(),
id: id.map(|i| i.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); tracing::debug!("setup stream: {}", namespace);
let mut inner = resp.into_inner(); let mut inner = resp.into_inner();
while let Ok(Some(message)) = inner.message().await { while let Ok(Some(message)) = inner.message().await {
tracing::debug!("received message: {}", namespace); tracing::debug!("received message: {}", namespace);
exec.execute(message).await?; exec.execute(message)
.await
.inspect_err(|e| tracing::warn!("failed to handle message: {}", e))?;
} }
Ok(()) Ok(())