From 78fd30a96c3d133a0d04d16a3e36bd3253b2217b Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 7 Aug 2024 11:36:53 -0400 Subject: [PATCH] feat(error): use unexpected error instead --- crates/pool/src/server/local.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/pool/src/server/local.rs b/crates/pool/src/server/local.rs index 0733f9a78..f7413b2d6 100644 --- a/crates/pool/src/server/local.rs +++ b/crates/pool/src/server/local.rs @@ -106,9 +106,14 @@ impl LocalPoolHandle { response: send, }) .await - .map_err(|_| anyhow::anyhow!("LocalPoolServer closed"))?; - recv.await - .map_err(|_| anyhow::anyhow!("LocalPoolServer closed"))? + .map_err(|_| { + error!("LocalPoolServer sender closed"); + PoolError::UnexpectedResponse + })?; + recv.await.map_err(|_| { + error!("LocalPoolServer receiver closed"); + PoolError::UnexpectedResponse + })? } }