Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3036

Improve error message for unknown MongoClient options

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.7
    • Affects Version/s: None
    • Component/s: 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@mongodb.com Casey Clements
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: