From 9736973c18a90e782df56bd5830b9ee3d44ea645 Mon Sep 17 00:00:00 2001 From: Niclas Blomberg Date: Tue, 5 Sep 2023 14:32:20 +0200 Subject: [PATCH] feat: send fallback message on failure --- src/phoenix/demotion_monitor.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/phoenix/demotion_monitor.rs b/src/phoenix/demotion_monitor.rs index 524ea11..2f368e8 100644 --- a/src/phoenix/demotion_monitor.rs +++ b/src/phoenix/demotion_monitor.rs @@ -108,6 +108,10 @@ pub async fn run_demotion_monitor(relay_pool: &PgPool, mev_pool: &PgPool) -> Res if let Err(error) = alert::send_telegram_alert(&message).await { error!(?error, ?message, "failed to send telegram alert"); + alert::send_telegram_alert( + "there were builder demotions, but the telegram alert failed", + ) + .await?; } }