-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 6.17.0
-
Component/s: CMAP, Connection Layer
As described in https://www.mongodb.com/community/forums/t/mongodb-node-js-driver-vs-aws-lambda-with-provisioned-concurrency/326386, a Node.js writeAfterFIN error can bubble up to the driver.
In NODE-6864, all socket errors were handled to be wrapped in MongoNetworkErrors, however this doesn't appear to be handled.
Use Case
As a... Node.js engineer
I want... any socket error to be converted to a MongoNetworkError
So that... driver retry and resume logic responds as expected
User Experience
- What is the desired/expected outcome for the user once this ticket is implemented?
- Socket error events are always converted to our MongoNetworkError class, because the driver will not retry plain runtime errors
Dependencies
- None
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- Is there an opportunity for better cross-driver alignment or testing in this area?
- Is there an opportunity to improve existing documentation on this subject?
Acceptance Criteria
Implementation Requirements
- Identify the node socket APIs that are still not being wrapped (socket.write is one)
- Convert socket errors to MongoNetworkErrors
Testing Requirements
- Assert a MongoNetworkError is thrown in the identified cases
Documentation Requirements
- None
Follow Up Requirements
- None
- related to
-
NODE-6864 Socket errors from error event handler can be left unconverted to MongoNetworkError
-
- Closed
-