Details
Description
When entering an invalid connection string the whole Compass crashes. This seems to happen if some of the url parameters have a wrong type (ie. I've added socketTimeoutMS twice and is considered to be an array instead of an integer)
This is the error i get the console:
electron-localshortcut eventStamp: [object Object] no match +0ms
|
/usr/local/lib/node_modules/mongodb-connection-model/node_modules/ampersand-state/ampersand-state.js:214 |
throw new TypeError('Property \'' + attr + '\' must be of type ' + def.type + '. Tried to set ' + newVal); |
^
|
TypeError: Property 'socketTimeoutMS' must be of type number. Tried to set 300,100 |
at child.set (/usr/local/lib/node_modules/mongodb-connection-model/node_modules/ampersand-state/ampersand-state.js:214:23) |
at child.Base (/usr/local/lib/node_modules/mongodb-connection-model/node_modules/ampersand-state/ampersand-state.js:39:21) |
at child [as constructor] (/usr/local/lib/node_modules/mongodb-connection-model/node_modules/ampersand-state/ampersand-state.js:785:27) |
at new child (/usr/local/lib/node_modules/mongodb-connection-model/node_modules/ampersand-state/ampersand-state.js:785:27) |
at /usr/local/lib/node_modules/mongodb-connection-model/lib/model.js:1170:27 |
at /usr/local/lib/node_modules/mongodb-connection-model/node_modules/mongodb/lib/core/uri_parser.js:116:9 |
at parseConnectionString (/usr/local/lib/node_modules/mongodb-connection-model/node_modules/mongodb/lib/core/uri_parser.js:685:3) |
at QueryReqWrap.callback (/usr/local/lib/node_modules/mongodb-connection-model/node_modules/mongodb/lib/core/uri_parser.js:110:7) |
at QueryReqWrap.onresolve [as oncomplete] (dns.js:205:10) |
(edited)
|