Improve error message for unknown MongoClient options

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 4.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When MongoClient is passed an unknown option we raise a ConfigurationError for example:

      >>> MongoClient(uuid_representation='standard')
      ...
      pymongo.errors.ConfigurationError: Unknown option uuid_representation
      

      It would be a better experience if we raised a error message more helpful than "Unknown option uuid_representation". Perhaps we could do some inspection and raise "Unknown option uuid_representation: did you mean uuidRepresentation?"

      Related to PYTHON-3033.

              Assignee:
              Casey Clements
              Reporter:
              Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: