duplicate key insert to capped collection with unique index generates OperationFailure instead of DuplicateKeyError

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.10
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If you try to insert a document with safe=True, which violates a key uniqueness constraint, instead of raising a proper DuplicateKeyError, pymongo raises an OperationFailure exception with the following args:

      (u'duplicate key insert for unique index of capped collection',)

              Assignee:
              Mathias Stearn
              Reporter:
              Avery Rosen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: