use hub's task factory to create task with error