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

mongo-python-driver - PR #1440: [PYTHON-3036] Improve error message for unknown MongoClient options

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      caseyclements has created PR #1440: [PYTHON-3036] Improve error message for unknown MongoClient options in mongo-python-driver

      Issue Text:
      https://jira.mongodb.org/browse/PYTHON-3036

      When an unknown kwarg was passed to MongoClient, the ConfigurationError wasn't helpful. I use the standard lib package `difflib` to look for similar known options. It appears to work pretty well.

      First contribution to this mongodb. This PR / ticket doubles as SDLC tutorial. I've got a feature branch with a couple tests that I'll now use.

      It will now look something like this:

      ```
      ConfigurationError('Unknown option: auth. Did you mean: authsource, authmechanism, authoidcallowedhosts?')
      ```

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: