Error handling for Aggregations