-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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-4847): Add config error handling to logging #3970
Conversation
(housekeeping): double check the checkboxes in the pr description |
Could we be more specific in the PR title and description, and maybe AC to the ticket about what we expect from this PR? The current description is mostly about the parent ticket and also |
Updated the PR description and Logging Mini Design! |
Description
Essentially, these changes ensure that the logger does not crash the user's application at runtime, at any point after options are parsed.
During options parsing, if the argument passed in is of incorrect type we want to throw for client options, but not for an incorrect environment option (set to default in this case).
What is changing?
To ensure we don't crash the user's application through the logger, unless there is an invalid type client option passed in to the
MongoClient / ConnectionString
.Invalid argument types are checked through the
transform
function for an element of theOPTIONS
array. TheOPTIONS
array is used in parseOptions (which is called byMongoClient
andConnectionString
), so it resolves the argument types for both classes.See all unit tests defined under config error handling in Kickoff Document,
Is there new documentation needed for these changes?
After NODE-5672 (Release Logger)
What is the motivation for this change?
This ticket is a subtask of NODE-4816 (Add Error Handling to the Logger).
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript