Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-5762): include cause and package name for all MongoMissingDependencyErrors #4067

Merged
merged 6 commits into from
Apr 5, 2024

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Apr 3, 2024

Description

What is changing?

MongoMissingDependencyError now includes two required properties:

  • dependencyName - the name of the missing dependency
  • cause - the error thrown when attempting to require the missing dependency.
Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

cause and package name included for MongoMissingDependencyErrors

MongoMissingDependencyErrors now include a cause and a dependencyName field, which can be used to programmatically determine which package is missing and why the driver failed to load it.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson changed the title add more descriptive error info feat(NODE-5762): include cause and package name for all MongoMissingDependencyErrors Apr 3, 2024
src/cmap/connection.ts Outdated Show resolved Hide resolved
@nbbeeken nbbeeken self-assigned this Apr 3, 2024
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Apr 3, 2024
src/error.ts Outdated Show resolved Hide resolved
src/encrypter.ts Outdated Show resolved Hide resolved
src/deps.ts Show resolved Hide resolved
src/cmap/connection.ts Outdated Show resolved Hide resolved
@baileympearson baileympearson requested a review from addaleax April 4, 2024 14:24
@baileympearson baileympearson marked this pull request as ready for review April 4, 2024 14:24
@baileympearson baileympearson requested a review from nbbeeken April 4, 2024 14:33
src/error.ts Outdated Show resolved Hide resolved
@baileympearson baileympearson requested a review from nbbeeken April 4, 2024 15:59
nbbeeken
nbbeeken previously approved these changes Apr 4, 2024
addaleax
addaleax previously approved these changes Apr 5, 2024
src/cmap/connection.ts Outdated Show resolved Hide resolved
@baileympearson baileympearson dismissed stale reviews from addaleax and nbbeeken via 45cca73 April 5, 2024 16:48
Co-authored-by: Anna Henningsen <github@addaleax.net>
@baileympearson baileympearson requested a review from nbbeeken April 5, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants