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

Resync Connection String Spec Tests #1656

Merged
merged 2 commits into from
Jan 30, 2018
Merged

Resync Connection String Spec Tests #1656

merged 2 commits into from
Jan 30, 2018

Conversation

jlord
Copy link
Contributor

@jlord jlord commented Jan 29, 2018

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

@jlord jlord requested a review from mbroadst January 29, 2018 21:12
@jlord jlord changed the title Resync connstring Resync Connection String Spec Tests Jan 29, 2018
@jlord jlord requested a review from daprahamian January 30, 2018 15:17
try {
result = parser.parse(url, true);
} catch (e) {
return callback(new Error('URL malformed, cannot be parsed'));
Copy link
Contributor

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?

Copy link
Contributor Author

@jlord jlord Jan 30, 2018

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, makes sense

Copy link
Contributor

@daprahamian daprahamian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants