Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1253

AggregationOutput should not throw IllegalArgumentException on command failure

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.12.3
    • Affects Version/s: 2.12.0
    • Component/s: Command Operations
    • None

      Currently the DBCollection.aggregate(final List<DBObject> pipeline) method which returns an AggregationOutput will throw an IllegalArgumentException to clients.

      I would instead expect the command result to be checked with CommandResult.throwOnError() as is done for the other overloaded aggregate methods returning a DBCursor.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            john.morales@mongodb.com John Morales (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: