From 47933c9949e343888df334006abef52ef5ff8438 Mon Sep 17 00:00:00 2001 From: John O'Mahoney Date: Mon, 16 Jan 2017 20:49:41 +0000 Subject: [PATCH] Shows help message for broken require in scheduler adapter (#7706) closes #7584 - added help message to assist in debugging broken require --- core/server/scheduling/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/scheduling/utils.js b/core/server/scheduling/utils.js index b4f1b4554d..599ad2835b 100644 --- a/core/server/scheduling/utils.js +++ b/core/server/scheduling/utils.js @@ -38,7 +38,7 @@ exports.createAdapter = function (options) { } // CASE: if module not found it can be an error within the adapter (cannot find bluebird for example) else if (err.code === 'MODULE_NOT_FOUND' && err.message.indexOf(contentPath + activeAdapter) === -1) { - return Promise.reject(new errors.IncorrectUsageError({err: err})); + return Promise.reject(new errors.IncorrectUsageError({err: err, help: 'Please check the imports are valid in ' + contentPath + activeAdapter})); } }