fix: include peer context in distributed query errors (#10118)

Signed-off-by: WenyXu <wenymedia@gmail.com>
(cherry picked from commit 8deb3872b3)
Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
Weny Xu
2026-11-09 06:41:08 +00:00
committed by WenyXu
parent 5b780bd3e0
commit 9faa0240b9
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -291,8 +291,9 @@ pub enum Error {
location: Location,
},
#[snafu(display("Failed to handle query"))]
#[snafu(display("Failed to handle query, addr: {}", addr))]
HandleQuery {
addr: String,
source: common_meta::error::Error,
#[snafu(implicit)]
location: Location,
+3 -1
View File
@@ -84,7 +84,9 @@ impl DistributedInformationExtension {
header: None,
})
.await
.context(crate::error::HandleQuerySnafu)
.context(crate::error::HandleQuerySnafu {
addr: node.peer.addr,
})
}
}))
.await?;
+1 -1
View File
@@ -42,7 +42,7 @@ pub enum Error {
location: Location,
},
#[snafu(display("Failed to do Flight get, code: {}", tonic_code))]
#[snafu(display("Failed to do Flight get, addr: {}, code: {}", addr, tonic_code))]
FlightGet {
addr: String,
tonic_code: Code,