Skip to content

chore: improve invalid connection string message when scheme/protocol is invalid #17

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

Merged
merged 2 commits into from
Jan 20, 2022

Conversation

Anemy
Copy link
Member

@Anemy Anemy commented Jan 18, 2022

I think having the errors here be descriptive will probably help users down the line. This makes it so we can remove this message in Compass: https://github.com/mongodb-js/compass/pull/2692/files#diff-ba79710b42fded58d9766f054a11ba5a3646e74b580689f2dcf8e18404594e2fL199
And VSCode: https://github.com/mongodb-js/vscode/blob/main/src/connectionController.ts#L250

Should we also mention the connection string being passed as we did previously?
Invalid schema, expected connection string to start with "mongodb://" or "mongodb+srv://"
vs
Invalid connection string "totallynotamongodb://outerspace", expected uri to start with "mongodb://" or "mongodb+srv://"

Any preference on error message?
MongoDB connection strings begin with "mongodb://" or "mongodb+srv://"
vs
Invalid schema, expected connection string to start with "mongodb://" or "mongodb+srv://"

@Anemy Anemy merged commit 93b8b28 into main Jan 20, 2022
@Anemy Anemy deleted the improve-default-error-message branch January 20, 2022 16:28
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.

2 participants