Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-926

mongoc_collection_aggregate can return NULL

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      In CDRIVER-880 we opted to hold true to our docs and return a valid cursor that would then result in failure once iterated over.

      However, mongoc_collection_aggregate() can return a NULL when the server preselection fails, and no error will be reported at all as we discard of the error from the preselect:

      https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-collection.c#L243-L251

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: