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

prohibit -p without supplying username

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.2
    • Affects Version/s: None
    • Component/s: CLI Module
    • None
    • 3
    • Not Needed
    • Iteration Cuttlefish, Iteration Dolphin, Iteration Porpoise

      Problem Statement/Rationale

      What is going wrong? What action would you like the Engineering team to take?

      It's common to mistakenly give -p on the command line to specify a port, rather than --port. It would be nice to give a friendly error message suggesting that --port was intended, if the command line parameters are supplying -p and are not specifying a username with -u (or via any other method), since there is no use case for specifying a password but no username.

      Steps to Reproduce

      How could an engineer replicate the issue you’re reporting?

      Observe today's opaque error message by running "mongosh -p the_password".

      Expected Results

      What do you expect to happen?
      Better error message referencing -p and --port confusion.

      Actual Results

      What do you observe is happening?
      Opaque error message about unparsable URI.

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: