Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2983

Some error messages for conflicting URI/CLI arguments are misleading

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 100.5.2
    • Affects Version/s: None
    • Component/s: None
    • None

      Problem Statement/Rationale

      The error message in this line is misleading:

      https://github.com/mongodb/mongo-tools/blob/460c7e26f65c4ce86a0b99c46a559dccaba3a07d/common/options/options.go#L839 

      says:

      return ConflictingArgsErrorFormat("authSource", opts.Source, cs.AuthSource, "--authenticationDatabase")

      We believe it should be:

      return ConflictingArgsErrorFormat("authSource", cs.AuthSource, opts.Source, "-authenticationDatabase")

      As this code expects:

      https://github.com/mongodb/mongo-tools/blob/460c7e26f65c4ce86a0b99c46a559dccaba3a07d/common/options/options.go#L44 
      optionName, uriValue, cliValue, cliOptionName)

       

       

      Is this something you can fix?

            Assignee:
            tim.fogarty@mongodb.com Tim Fogarty
            Reporter:
            gunicsba@gmail.com Balázs Gunics
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: