{"action":"created","issue":{"url":"https://api.github.com/repos/mafintosh/mongojs/issues/244","repository_url":"https://api.github.com/repos/mafintosh/mongojs","labels_url":"https://api.github.com/repos/mafintosh/mongojs/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/mafintosh/mongojs/issues/244/comments","events_url":"https://api.github.com/repos/mafintosh/mongojs/issues/244/events","html_url":"https://github.com/mafintosh/mongojs/issues/244","id":101287988,"number":244,"title":"Getting no error when connecting to non existing mongo database","user":{"login":"ygrenzinger","id":1290368,"avatar_url":"https://avatars.githubusercontent.com/u/1290368?v=3","gravatar_id":"","url":"https://api.github.com/users/ygrenzinger","html_url":"https://github.com/ygrenzinger","followers_url":"https://api.github.com/users/ygrenzinger/followers","following_url":"https://api.github.com/users/ygrenzinger/following{/other_user}","gists_url":"https://api.github.com/users/ygrenzinger/gists{/gist_id}","starred_url":"https://api.github.com/users/ygrenzinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ygrenzinger/subscriptions","organizations_url":"https://api.github.com/users/ygrenzinger/orgs","repos_url":"https://api.github.com/users/ygrenzinger/repos","events_url":"https://api.github.com/users/ygrenzinger/events{/privacy}","received_events_url":"https://api.github.com/users/ygrenzinger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2015-08-16T18:51:36Z","updated_at":"2016-08-01T17:56:29Z","closed_at":"2015-10-12T08:32:55Z","body":"Hello,\r\n\r\nEverything seems fine when the db url is good but for any wrong MongoDB url there no error happening.\r\n\r\nthis is my code:\r\n```\r\n        mongoDB = mongojs('mongodb://1.0.0.1:23/aiguillage', ['vecteurs', 'aiguillages', 'aboProfiles']);\r\n\r\n        mongoDB.on('ready', function () {\r\n            logger.info('database connected');\r\n        });\r\n\r\n        mongoDB.on('error', function (err) {\r\n            logger.error('connection error:' + err);\r\n        });\r\n\r\n        mongoDB.runCommand({ping: 1}, function (err, res) {\r\n            if(!err && res.ok) logger.info('we\\'re up');\r\n            else throw \"impossible to connect to mongodb: \" + mongoDbUrl;\r\n        });\r\n```\r\n\r\nAny idea ?"},"comment":{"url":"https://api.github.com/repos/mafintosh/mongojs/issues/comments/236656519","html_url":"https://github.com/mafintosh/mongojs/issues/244#issuecomment-236656519","issue_url":"https://api.github.com/repos/mafintosh/mongojs/issues/244","id":236656519,"user":{"login":"matteocontrini","id":2164763,"avatar_url":"https://avatars.githubusercontent.com/u/2164763?v=3","gravatar_id":"","url":"https://api.github.com/users/matteocontrini","html_url":"https://github.com/matteocontrini","followers_url":"https://api.github.com/users/matteocontrini/followers","following_url":"https://api.github.com/users/matteocontrini/following{/other_user}","gists_url":"https://api.github.com/users/matteocontrini/gists{/gist_id}","starred_url":"https://api.github.com/users/matteocontrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matteocontrini/subscriptions","organizations_url":"https://api.github.com/users/matteocontrini/orgs","repos_url":"https://api.github.com/users/matteocontrini/repos","events_url":"https://api.github.com/users/matteocontrini/events{/privacy}","received_events_url":"https://api.github.com/users/matteocontrini/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T17:56:29Z","updated_at":"2016-08-01T17:56:29Z","body":"It should be noted that the `connectionTimeout` options is [now](https://github.com/mongodb/node-mongodb-native/blob/63ec4ef433fb3a2c9fee22488cca741298618bbb/docs/reference/content/reference/faq/index.md) called `connectTimeoutMS`."}}
{"actor":{"display_login":"matteocontrini"}}