Skip to content

Commit 2e2c20a

Browse files
authored
Fix logging bug on task completer by adding nil check to error (#6603)
1 parent 9673c74 commit 2e2c20a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/matching/tasklist/task_completer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (tc *taskCompleterImpl) CompleteTaskIfStarted(ctx context.Context, task *In
154154

155155
err := tc.throttleRetry.Do(ctx, op)
156156

157-
if !errors.Is(err, errDomainIsActive) && !errors.Is(err, errTaskNotStarted) {
157+
if err != nil && !errors.Is(err, errDomainIsActive) && !errors.Is(err, errTaskNotStarted) {
158158
tc.scope.IncCounter(metrics.StandbyClusterTasksCompletionFailurePerTaskList)
159159
tc.logger.Error("Error completing task on domain's standby cluster", tag.Error(err))
160160
}

0 commit comments

Comments
 (0)