From 55a6dc9ae3b02f6d4f5566c0dd7b7c23a3e5f358 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Fri, 10 Jan 2020 16:01:22 +1100 Subject: [PATCH] Notifier errors (#793) * Handle notifier errors * Log error for notifier errors --- beacon_node/client/src/notifier.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/beacon_node/client/src/notifier.rs b/beacon_node/client/src/notifier.rs index e0c97c93c7..3785821003 100644 --- a/beacon_node/client/src/notifier.rs +++ b/beacon_node/client/src/notifier.rs @@ -37,6 +37,7 @@ pub fn spawn_notifier( ) -> Result { let log_1 = context.log.clone(); let log_2 = context.log.clone(); + let log_3 = context.log.clone(); let slot_duration = Duration::from_millis(milliseconds_per_slot); let duration_to_next_slot = beacon_chain @@ -161,6 +162,16 @@ pub fn spawn_notifier( }; Ok(()) + }) + .then(move |result| { + match result { + Ok(()) => Ok(()), + Err(e) => Ok(error!( + log_3, + "Notifier failed to notify"; + "error" => format!("{:?}", e) + )) + } }); let (exit_signal, exit) = exit_future::signal();