Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-320

Consistently throw when result of command has ok: 0

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.3.1
    • Affects Version/s: None
    • Component/s: Shell API
    • Labels:
      None
    • 3
    • Needed
    • Hide

      Whenever the server returns

      {ok: 0}

      , shell helpers will throw an exception (MongoshCommandFailed). so something like `db.serverBuildInfo.ok` won't make sense since if ok was 0 it would throw

      db.runCommand will not throw, or db.coll.runCommand and will only return whatever the server returns.

      Show
      Whenever the server returns {ok: 0} , shell helpers will throw an exception (MongoshCommandFailed). so something like `db.serverBuildInfo.ok` won't make sense since if ok was 0 it would throw db.runCommand will not throw, or db.coll.runCommand and will only return whatever the server returns.
    • Iteration Lime

      Throw for all shell helpers (except runCommand) if the result `ok: 0`, or figure out what exactly we want to do and document it.

            Assignee:
            anna.herlihy@mongodb.com Anna Herlihy (Inactive)
            Reporter:
            anna.herlihy@mongodb.com Anna Herlihy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: