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 {
222
222
Err ( err) => Err ( HandlerError :: Message ( err) ) ,
223
223
Ok ( Some ( input) ) => {
224
224
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
+ } )
226
233
} else {
227
234
Err ( HandlerError :: Message ( format!(
228
235
"The feature `{}` is not enabled in this repository.\n \
@@ -361,7 +368,12 @@ macro_rules! command_handlers {
361
368
if let Some ( config) = & config. $name {
362
369
$name:: handle_command( ctx, config, event, command)
363
370
. 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
+ } ) ;
365
377
} else {
366
378
errors. push( HandlerError :: Message ( format!(
367
379
"The feature `{}` is not enabled in this repository.\n \
You can’t perform that action at this time.
0 commit comments