From cfdb6d542a524208a7fa678bc89333b462c5fcc1 Mon Sep 17 00:00:00 2001 From: Urgau Date: Fri, 24 Oct 2025 23:14:10 +0200 Subject: [PATCH] Post a user message when a command processing fails --- src/handlers.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/handlers.rs b/src/handlers.rs index 022848638..0b5a79e8c 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -422,6 +422,11 @@ macro_rules! command_handlers { if let Some(err) = err.downcast_mut::() { errors.push(HandlerError::Message(std::mem::take(&mut err.0))); } else { + errors.push(HandlerError::Message(format!( + "`{}` handler unexpectedly failed in [this comment]({}): {err}", + stringify!($name), + event.html_url().expect("has html url"), + ))); errors.push(HandlerError::Other(err.context(format!( "error when processing {} command handler", stringify!($name)