Raise Exception on Query Failures

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.0.5
    • Affects Version/s: 2.0.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When a query fails, such as with a syntax error, currently a document is returned with an error message. We should be raising an exception in this case.

      Example:

      collection.find('$or' => [])
      

      This should raise an OperationFailure with the following message:

      Can't canonicalize query: BadValue $and/$or/$nor must be a nonempty array (17287)

              Assignee:
              Durran Jordan
              Reporter:
              Durran Jordan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: