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

[v4.x BACKPORT] Handle error messages from AggregateError

    • 2
    • Not Needed
    • Not Needed
    • 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?

      Backport NODE-5296 to v4.x.

      Parent Ticket Description:

      Use Case

      As a driver user and engineer
      I want to be able to read a helpful error message at the top level error
      So that I do not have to programmatically access the error structure

      User Impact

      • Starting in Node.js 20 ECONNREFUSED errors are returns as AggregateErrors which have an empty message string. Our current error handling logic will then also have an empty error message.

      Unknowns

      • How should we build a message from an AggregateError?
        • Answer: Join error messages together

      Acceptance Criteria

      Implementation Requirements

      • Join error messages in MongoError super class

      Testing Requirements

      • Unit test passing AggregateError to MongoError and asserting an appropriate message is set
      • revert satisfies assertion in client_side_encryption.prose.test.js, bypass mongocryptd tests, the error message should be matched on instead

      Documentation Requirements

      • None

      Follow Up Requirements

      • Double check mongoclient encryption and file a ticket if needed

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

              Created:
              Updated:
              Resolved: