diff --git a/core/server/errors.js b/core/server/errors.js index 12d17fb15f..5b4828f7ed 100644 --- a/core/server/errors.js +++ b/core/server/errors.js @@ -54,6 +54,12 @@ var ghostErrors = { errorType: 'ThemeValidationError', errorDetails: {} }, options)); + }, + DisabledFeatureError: function DisabledFeatureError(options) { + GhostError.call(this, _.merge({ + statusCode: 409, + errorType: 'DisabledFeatureError', + }, options)); } }; diff --git a/core/server/translations/en.json b/core/server/translations/en.json index b7ea676241..100ed65074 100644 --- a/core/server/translations/en.json +++ b/core/server/translations/en.json @@ -485,7 +485,7 @@ }, "helpers": { "helperNotAvailable": "The \\{\\{{helperName}\\}\\} helper is not available.", - "flagMustBeEnabled": "The {flagName} labs flag must be enabled if you wish to use the \\{\\{{helperName}\\}\\} helper.", + "flagMustBeEnabled": "The {flagName} flag must be enabled in labs if you wish to use the \\{\\{{helperName}\\}\\} helper.", "seeLink": "See {url}", "foreach": { "iteratorNeeded": "Need to pass an iterator to #foreach" diff --git a/core/server/utils/labs.js b/core/server/utils/labs.js index 0ac5542615..c72b1c24cf 100644 --- a/core/server/utils/labs.js +++ b/core/server/utils/labs.js @@ -30,7 +30,7 @@ labs.enabledHelper = function enabledHelper(options, callback) { help: i18n.t('warnings.helpers.seeLink', {url: options.helpUrl}) }; - logging.error(new errors.GhostError(errDetails)); + logging.error(new errors.DisabledFeatureError(errDetails)); errString = new SafeString( '' diff --git a/core/test/unit/server_helpers/get_spec.js b/core/test/unit/server_helpers/get_spec.js index 6b3121c3f1..64cb60467e 100644 --- a/core/test/unit/server_helpers/get_spec.js +++ b/core/test/unit/server_helpers/get_spec.js @@ -45,7 +45,7 @@ describe('{{#get}} helper', function () { result().should.be.an.Object().with.property( 'string', '' );