Skip to content

Commit 155de2d

Browse files
Jessica Lordmbroadst
Jessica Lord
authored andcommitted
fix(url parser): log instead of throw error for unsupported url options
1 parent 6a9e7ba commit 155de2d

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

lib/url_parser.js

+4-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
var ReadPreference = require('./read_preference'),
44
parser = require('url'),
55
f = require('util').format,
6-
assign = require('./utils').assign;
6+
assign = require('./utils').assign,
7+
Logger = require('mongodb-core').Logger;
78

89
module.exports = function(url, options) {
910
// Variables
@@ -265,16 +266,6 @@ module.exports = function(url, options) {
265266
case 'auto_reconnect':
266267
serverOptions.auto_reconnect = value === 'true';
267268
break;
268-
case 'minPoolSize':
269-
throw new Error('minPoolSize not supported');
270-
case 'maxIdleTimeMS':
271-
throw new Error('maxIdleTimeMS not supported');
272-
case 'waitQueueMultiple':
273-
throw new Error('waitQueueMultiple not supported');
274-
case 'waitQueueTimeoutMS':
275-
throw new Error('waitQueueTimeoutMS not supported');
276-
case 'uuidRepresentation':
277-
throw new Error('uuidRepresentation not supported');
278269
case 'ssl':
279270
if (value === 'prefer') {
280271
serverOptions.ssl = value;
@@ -448,6 +439,8 @@ module.exports = function(url, options) {
448439
serverOptions.compression = compression;
449440
break;
450441
default:
442+
var logger = Logger('URL Parser');
443+
logger.info(`${name} is not supported`);
451444
break;
452445
}
453446
});

0 commit comments

Comments
 (0)