MongoServerError enumerable keys are duplicated by errorResponse

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • 1
    • Not Needed
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      As a Node driver engineer,
      I want to store error information in exactly one place,
      So that we don't need to be responsible for maintaining the server information in two places.

      The server's actual error is stored both as the `errorResponse` field on the MongoServerError and has every property copied onto the server error (see https://github.com/mongodb/node-mongodb-native/blob/8ab5d19bee52bf1f0bc24a76586375a4825190f9/src/error.ts#L226).

      Unknowns

      n/a

      Acceptance Criteria

      Implementation Requirements

      • Remove the logic that copies keys from the server error onto the MongoServerError and instead only provide the `errorResponse` field.

      Documentation Requirements

      • Remove API docs for MongoServerError enumerable keys

            Assignee:
            Bailey Pearson
            Reporter:
            Aditi Khare (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: