-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
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
- backported by
-
NODE-5311 [v4.x BACKPORT] Handle error messages from AggregateError
- Closed