Improve error message for invalid hint

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 2.5.5
    • Affects Version/s: 2.5.4
    • Component/s: Querying
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When hinting on a non-existent index, the new query framework error message is difficult to parse and needs at least punctuation between the message and the query details. Ideally it would tell the reason as in 2.4

      In 2.4.8

      > db.c.find( {} ).hint({b:1})
      error: { "$err" : "bad hint", "code" : 10113 }
      

      In 2.5.5-pre:

      > db.c.find( {} ).hint({b:1})
      error: {
      	"$err" : "Couldn't get runner for query because: No query solutions query is ns=luke.c limit=0 skip=0\nTree: $and\nSort: {}\nProj: {}\n",
      	"code" : 17007
      }
      

            Assignee:
            Benety Goh
            Reporter:
            Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: