We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 558182f commit 3ce148dCopy full SHA for 3ce148d
lib/core/connection/connect.js
@@ -179,6 +179,9 @@ function prepareHandshakeDocument(authContext, callback) {
179
}
180
181
const authProvider = AUTH_PROVIDERS[credentials.mechanism];
182
+ if (authProvider == null) {
183
+ return callback(new MongoError(`No AuthProvider for ${credentials.mechanism} defined.`));
184
+ }
185
authProvider.prepare(handshakeDoc, authContext, callback);
186
return;
187
0 commit comments