From b59465ddeb2b518f65f36534ab3c89a672083bac Mon Sep 17 00:00:00 2001 From: Reed Allman Date: Sun, 11 Jun 2017 03:10:16 -0700 Subject: [PATCH] don't overwrite error when inserting into db --- api/runner/worker.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/runner/worker.go b/api/runner/worker.go index 5af1a07f5..034820284 100644 --- a/api/runner/worker.go +++ b/api/runner/worker.go @@ -73,8 +73,10 @@ func (rnr *Runner) RunTrackedTask(newTask *models.Task, ctx context.Context, cfg newTask.CompletedAt = completedAt newTask.Status = status - err = ds.InsertTask(ctx, newTask) - // TODO we should just log this error not return it to user? just issue storing task status but task is run + if err := ds.InsertTask(ctx, newTask); err != nil { + // TODO we should just log this error not return it to user? just issue storing task status but task is run + logrus.WithError(err).Error("error inserting task into datastore") + } return result, err }