Skip to content

Commit 3833d13

Browse files
Adding the name of the failing activity. For more detail (#678)
Signed-off-by: arturo <[email protected]>
1 parent aded0b6 commit 3833d13

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

workflow/worker.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@ func wrapActivity(a Activity) task.Activity {
125125
return func(ctx task.ActivityContext) (any, error) {
126126
aCtx := ActivityContext{ctx: ctx}
127127

128-
return a(aCtx)
128+
result, err := a(aCtx)
129+
if err != nil {
130+
activityName, _ := getFunctionName(a) // Get the activity name for context
131+
return nil, fmt.Errorf("activity %s failed: %w", activityName, err)
132+
}
133+
134+
return result, nil
129135
}
130136
}
131137

0 commit comments

Comments
 (0)