-
Type: Improvement
-
Resolution: Gone away
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Error
Description
We should wrap the raw NodeJS Error passed to the callback in a MongoError subclass. This instance of a NodeJS Error being propagated was missed in the implementation of the driver error overhaul (NODE-3292).
Acceptance Criteria
Implementation Requirements
- Wrap the socket.authorizationError provided to the callback with a MongoError subclass (which one is most appropriate is TBD in this ticket)
- Investigate updating the Callback utility type to accept MongoError as its optional error argument instead of AnyError and consider deprecating/completely removing the AnyError type in the driver.
- Note: There are only ~10 errors caused across the driver by changing the definition of the Callback utility type.
- remove cast to MongoError in createConnection method in connection_pool.ts
- is depended on by
-
NODE-5985 Expired TLS certificate error reports code as error message
- Closed