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

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

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.5.3
    • None
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: