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

MongoshInvalidInputError not clear enough

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.10.0
    • Affects Version/s: None
    • Component/s: Shell API
    • Labels:
      None
    • 2
    • Not Needed
    • Iteration Yucca

      At the moment errors due to invalid arguments are not very clear and misses informations about which function caused the issue.

      MongoshInvalidInputError: [COMMON-10001] Argument at position 0 must be of type string, got number instead
      

      Just reporting some comments from slack about this topic:

      "if we’re not showing any stack trace information by default, could we make a ticket to at least make sure that our basic input validation (assertArgsDefined and friends) always print the function name as well?"

      and:

      "I think that would be cool, and a bit more user friendly even.
      Like instead of at position0 could we say something like NumberDecimal should be called with a string, e.g. NumberDecimal("1.5")"

            Assignee:
            michael.rose@mongodb.com Michael Rose (Inactive)
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: