From 7d87e11e0faac80be33f994d92e6af2127a39d65 Mon Sep 17 00:00:00 2001 From: divma Date: Thu, 6 Aug 2020 04:29:23 +0000 Subject: [PATCH] Fix rpc coded response display (#1470) Prevent errors to be printed in debug mode --- beacon_node/eth2_libp2p/src/rpc/methods.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/eth2_libp2p/src/rpc/methods.rs b/beacon_node/eth2_libp2p/src/rpc/methods.rs index 184dfd84f1..bc160b9c64 100644 --- a/beacon_node/eth2_libp2p/src/rpc/methods.rs +++ b/beacon_node/eth2_libp2p/src/rpc/methods.rs @@ -366,7 +366,7 @@ impl std::fmt::Display for RPCCodedResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { RPCCodedResponse::Success(res) => write!(f, "{}", res), - RPCCodedResponse::Error(code, err) => write!(f, "{}: {:?}", code, err), + RPCCodedResponse::Error(code, err) => write!(f, "{}: {}", code, err.to_string()), RPCCodedResponse::StreamTermination(_) => write!(f, "Stream Termination"), } }