// MarkTaskFailed marks the task as failed. func MarkTaskFailed(t *automationpb.Task, output string, err error) { t.State = automationpb.TaskState_DONE t.Output = output t.Error = err.Error() }