-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Dependencies, Error
How are you using Mongo? What version of the server and driver are you using?
I’m a mongosh developer.
What is the feature/improvement you would like?
It would be very neat if MongoMissingDependencyError were more programmatically accessible. Specifically:
- It should expose the name of the missing package as a property
- It should consistently use the cause property to expose the original error and not just do this for some errors
What use case would this feature/improvement enable?
Right now, it would make it easier for mongosh to display a meaningful error message when Kerberos loading fails. With the default driver error message, users cannot distinguish between a broken Kerberos npm package and missing Kerberos system libraries.
Acceptance Criteria
- Expose the name of the missing dependency as a string property on the `MongoMissingDependencyError` class.
- When we attempt to load a dependency and fail, provide the `cause` to the `MongoMissingDependencyError`