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

Investigate NODE-4317 - Create codeName property for insertOne

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor - P4
    • Resolution: Gone away
    • None
    • None
    • None
    • 1
    • Not Needed

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: