diff --git a/lib/utils.js b/lib/utils.js index 8dba5e1a..423db4df 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -35,6 +35,14 @@ function validateTopics (topics) { return typeof topic.partition !== 'number'; } return false; + })) { + throw new InvalidConfigError('Partition must be a number and can not contain characters'); + } + if (topics.some(function (topic) { + if ('offset' in topic) { + return typeof topic.offset !== 'number'; + } + return false; })) { throw new InvalidConfigError('Offset must be a number and can not contain characters'); }