Skip to content

fix(NODE-3397): report more helpful error with unsupported authMechanism in initial handshake #2876

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jul 2, 2021

Conversation

vkarpov15
Copy link
Contributor

Description

I haven't been able to repro this locally, but there's a user that ran into this case at Automattic/mongoose#10377. Figured this change is sufficiently straightforward that it's worthwhile to patch without digging into it much further.

What changed?

Added a quick check for null or undefined before calling a method on an object

Are there any files to ignore?

Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

Thanks! yea, I agree catching and improving the error message would be good here

Slight message refactor suggestion so that its the same as the error message we have in 4.x

made NODE-3397 to track

@nbbeeken nbbeeken changed the title fix(connection): report more helpful error with unsupported authMechanism in initial handshake fix(NODE-3397): report more helpful error with unsupported authMechanism in initial handshake Jul 1, 2021
Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

LGTM

@nbbeeken nbbeeken requested review from durran and emadum July 2, 2021 14:29
@nbbeeken nbbeeken merged commit 3ce148d into mongodb:3.6 Jul 2, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants