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

Expose MongoDB Error Types

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: TypeScript
    • Not Needed
    • Not Needed

      As a developer, I should be able to access MongoDB Error Types so that I can use error codes or messages better in my application.

      For Example: If I have a social media application with the below "user follow model":

      user: ObjectId("xxxxxxx"),

      follower: ObjectId("xxxxxx"),

      And user clicks the follow button again, MongoDB throws an error that has a code of 11000, I should be able to handle this error instead of checking the code and manually checking for if error.code = 11000.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bhupen@cofounderstown.com Bhupen Pal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: