Add has error field to the tasks