-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0.25, 2.0.26
-
Component/s: None
-
Labels:
-
Environment:CentOS, Node v0.10.33
-
Empty show more show less
When attempting to authenticate, if you throw the err that originates on an "auth failed" then the thrown error doesn't output the error message, instead it just says "Error" which makes the error basically useless.
The example below shows that doing a console.log of the error shows that the error is of type MongoError with a message of "auth failed" but when you throw the error none of that information is displayed. This makes me think that the errors are originating with an awkward syntax that is throwing node's native behaviors off.
var mongodb = require("mongodb"); mongodb.MongoClient.connect("mongodb://192.168.50.5/client_rc", function(err, db) { db.authenticate("bogus", "user", function(err) { console.log("err", err); throw err; }); });