From 2096b2f167f030a69c0654645d059ecb0f702980 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Wed, 21 Jun 2023 14:54:46 -0700 Subject: [PATCH] improve error logging for query execution (#150) --- nexus/server/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nexus/server/src/main.rs b/nexus/server/src/main.rs index fcb0a47373..079db4f437 100644 --- a/nexus/server/src/main.rs +++ b/nexus/server/src/main.rs @@ -278,7 +278,12 @@ impl NexusBackend { } }; - self.execute_statement(executor, &stmt, peer_holder).await + let res = self.execute_statement(executor, &stmt, peer_holder).await; + // log the error if execution failed + if let Err(err) = &res { + tracing::error!("query execution failed: {:?}", err); + } + res } NexusStatement::PeerCursor { stmt, cursor } => {