Add optional errorCallback to the aggregate function calls