Ensure collection.aggregate throws on error

JAVA-1253