-
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
Resync Connection String Spec Tests #1656
Conversation
try { | ||
result = parser.parse(url, true); | ||
} catch (e) { | ||
return callback(new Error('URL malformed, cannot be parsed')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add any specific error on how the url is malformed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original error from Node doesn't tell us that so we can't pass that info on, so we'd have to check ourselves for each possible type of error to relay how it was wrong which seems like a lot of work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Update to the latest tests from the connection string spec and fix our url parser so that it handles errors that come from Node's
url.parse
when given a bad uri.The error message uses 'malformed' because this is how the original Node error describes it.
Fixes NODE-1292