Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10721

Add an error code for "no such cmd: <command name>"

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      The error raised for a non-existent command doesn't currently include an error code. For example:

      > db.runCommand('foobar')
      {
      	"ok" : 0,
      	"errmsg" : "no such cmd: foobar",
      	"bad cmd" : {
      		"foobar" : 1
      	}
      }
      

      Drivers need an error code here to distinguish this case from other failure cases related to the new user manipulation commands (SERVER-6246).

      The error code has to remain the same in future releases since driver code will rely on it's value.

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: