introduce AggregationTask to provide error handling