Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4318

Investigate NODE-4317 - Create codeName property for insertOne

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 1
    • Not Needed

      NODE-4317 Description

      How are you using Mongo? What version of the server and driver are you using?

      Latest version

      What is the feature/improvement you would like?

       

      When I update a document that violates unique index in a collection, I get an error with codeName: 'DuplicateKey'. But when I insert a document that violates unique index in a collection, I just get an error with code 11000. I would like to also see there codeName 'DuplicateKey' in error object.

      What use case would this feature/improvement enable?

       

      It would improve readability of error handling in the code and also help to distinguish this kind of error from others.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            dbeng-pm-bot PM Bot
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: