Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-943

Raise Exception on Query Failures

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.5
    • Affects Version/s: 2.0.0
    • Component/s: None
    • Labels:
      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@mongodb.com Durran Jordan
            Reporter:
            durran.jordan@mongodb.com Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: