From 2510495ecf2ec4b3145c30972f0166c7694d3b50 Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Sat, 28 Apr 2018 22:54:38 +0300 Subject: [PATCH] v1.1.0 --- lib/dkim-handler.js | 8 ++++++-- package.json | 7 ++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/dkim-handler.js b/lib/dkim-handler.js index 789cd40f..0324f83f 100644 --- a/lib/dkim-handler.js +++ b/lib/dkim-handler.js @@ -138,7 +138,9 @@ class DkimHandler { } else if (options._id && tools.isId(options._id)) { query._id = new ObjectID(options._id); } else { - return setImmediate(() => callback(new Error('Invalid input'))); + let err = new Error('Invalid or unknown DKIM key'); + err.code = 'KeyNotFound'; + return setImmediate(() => callback(err)); } this.database.collection('dkim').findOne(query, (err, dkimData) => { @@ -199,7 +201,9 @@ class DkimHandler { } else if (options._id && tools.isId(options._id)) { query._id = new ObjectID(options._id); } else { - return setImmediate(() => callback(new Error('Invalid input'))); + let err = new Error('Invalid or unknown DKIM key'); + err.code = 'KeyNotFound'; + return setImmediate(() => callback(err)); } // delete address from email address registry diff --git a/package.json b/package.json index 386dcca8..f8ad61cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wildduck", - "version": "1.0.117", + "version": "1.1.0", "description": "IMAP/POP3 server built with Node.js and MongoDB", "main": "server.js", "scripts": { @@ -9,10 +9,7 @@ "apidoc": "apidoc -i lib/api/ -o docs/", "show": "NODE_CONFIG_ONLY=true node server.js" }, - "keywords": [ - "imap", - "mail server" - ], + "keywords": ["imap", "mail server"], "author": "Andris Reinman", "license": "EUPL-1.1+", "devDependencies": {