@@ -289,7 +289,7 @@ func (e *executor) handleActivityCompleted(event history.Event, a *history.Activ
289
289
290
290
err := f (a .Result , nil )
291
291
if err != nil {
292
- return fmt .Errorf ("setting result: %w" , err )
292
+ return fmt .Errorf ("setting activity completed result: %w" , err )
293
293
}
294
294
295
295
return e .workflow .Continue (e .workflowCtx )
@@ -302,7 +302,7 @@ func (e *executor) handleActivityFailed(event history.Event, a *history.Activity
302
302
}
303
303
304
304
if err := f (nil , errors .New (a .Reason )); err != nil {
305
- return fmt .Errorf ("setting result: %w" , err )
305
+ return fmt .Errorf ("setting activity failed result: %w" , err )
306
306
}
307
307
308
308
return e .workflow .Continue (e .workflowCtx )
@@ -329,7 +329,7 @@ func (e *executor) handleTimerFired(event history.Event, a *history.TimerFiredAt
329
329
}
330
330
331
331
if err := f (nil , nil ); err != nil {
332
- return fmt .Errorf ("setting result: %w" , err )
332
+ return fmt .Errorf ("setting timer fired result: %w" , err )
333
333
}
334
334
335
335
return e .workflow .Continue (e .workflowCtx )
@@ -343,7 +343,7 @@ func (e *executor) handleTimerCanceled(event history.Event, a *history.TimerCanc
343
343
}
344
344
345
345
if err := f (nil , sync .Canceled ); err != nil {
346
- return fmt .Errorf ("setting result: %w" , err )
346
+ return fmt .Errorf ("setting timer canceled result: %w" , err )
347
347
}
348
348
349
349
return e .workflow .Continue (e .workflowCtx )
@@ -392,7 +392,7 @@ func (e *executor) handleSubWorkflowFailed(event history.Event, a *history.SubWo
392
392
}
393
393
394
394
if err := f (nil , errors .New (a .Error )); err != nil {
395
- return fmt .Errorf ("setting result: %w" , err )
395
+ return fmt .Errorf ("setting sub workflow failed result: %w" , err )
396
396
}
397
397
398
398
return e .workflow .Continue (e .workflowCtx )
@@ -405,7 +405,7 @@ func (e *executor) handleSubWorkflowCompleted(event history.Event, a *history.Su
405
405
}
406
406
407
407
if err := f (a .Result , nil ); err != nil {
408
- return fmt .Errorf ("setting result: %w" , err )
408
+ return fmt .Errorf ("setting sub workflow completed result: %w" , err )
409
409
}
410
410
411
411
return e .workflow .Continue (e .workflowCtx )
@@ -424,7 +424,9 @@ func (e *executor) handleSideEffectResult(event history.Event, a *history.SideEf
424
424
return errors .New ("no pending future found for side effect result event" )
425
425
}
426
426
427
- f (a .Result , nil )
427
+ if err := f (a .Result , nil ); err != nil {
428
+ return fmt .Errorf ("setting side effect result result: %w" , err )
429
+ }
428
430
429
431
return e .workflow .Continue (e .workflowCtx )
430
432
}
@@ -577,7 +579,7 @@ func (e *executor) processCommands(ctx context.Context, t *task.Workflow) (bool,
577
579
& history.SubWorkflowFailedAttributes {
578
580
Error : a .Error ,
579
581
},
580
- // Ensure the message gets sent back to the parent workflow with the right eventID
582
+ // Ensure the message gets sent back to the parent workflow with the right schedule event ID
581
583
history .ScheduleEventID (instance .ParentEventID ),
582
584
)
583
585
} else {
@@ -586,7 +588,7 @@ func (e *executor) processCommands(ctx context.Context, t *task.Workflow) (bool,
586
588
& history.SubWorkflowCompletedAttributes {
587
589
Result : a .Result ,
588
590
},
589
- // Ensure the message gets sent back to the parent workflow with the right eventID
591
+ // Ensure the message gets sent back to the parent workflow with the right schedule event ID
590
592
history .ScheduleEventID (instance .ParentEventID ),
591
593
)
592
594
}
0 commit comments