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

Audit validation error messages

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.0
    • Affects Version/s: None
    • Component/s: None
    • None

      PyMongo does a lot of validation of inputs. Our error messages for validation need to do two things at once:

      • Give python newbies the most obvious solution to their mistake, zen of python style.
      • Not mislead seasoned developers about acceptable inputs.

      For example, the new CRUD API methods validate the filter parameter to ensure that it inherits from collections.Mapping (or collections.MutableMapping for inserts). The existing error message says something like "filter must be a mapping type". This is likely confusing to naive users who don't know that a python "dict" is a mapping type.

      Come up with better messages that attempt to achieve the two goals listed above.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: