File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,14 @@ macro_rules! issue_handlers {
222222 Err ( err) => Err ( HandlerError :: Message ( err) ) ,
223223 Ok ( Some ( input) ) => {
224224 if let Some ( config) = & config. $name {
225- $name:: handle_input( ctx, config, event, input) . await . map_err( HandlerError :: Other )
225+ $name:: handle_input( ctx, config, event, input)
226+ . await
227+ . map_err( |e| {
228+ HandlerError :: Other ( e. context( format!(
229+ "error when processing {} handler" ,
230+ stringify!( $name)
231+ ) ) )
232+ } )
226233 } else {
227234 Err ( HandlerError :: Message ( format!(
228235 "The feature `{}` is not enabled in this repository.\n \
@@ -361,7 +368,12 @@ macro_rules! command_handlers {
361368 if let Some ( config) = & config. $name {
362369 $name:: handle_command( ctx, config, event, command)
363370 . await
364- . unwrap_or_else( |err| errors. push( HandlerError :: Other ( err) ) ) ;
371+ . unwrap_or_else( |err| {
372+ errors. push( HandlerError :: Other ( err. context( format!(
373+ "error when processing {} command handler" ,
374+ stringify!( $name)
375+ ) ) ) )
376+ } ) ;
365377 } else {
366378 errors. push( HandlerError :: Message ( format!(
367379 "The feature `{}` is not enabled in this repository.\n \
You can’t perform that action at this time.
0 commit comments