From cb322fc1be8a5e79605c48f0793f37ea333c7f5c Mon Sep 17 00:00:00 2001 From: Nazar Gargol Date: Tue, 23 Apr 2019 09:45:11 +0200 Subject: [PATCH] Improved error context usage refs #10571 - Change was done to avoid usage of hardcoded value and provide more context. Additionally errorDetails are formatted in a readable way --- core/server/api/v0.1/themes.js | 2 +- core/server/api/v2/themes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/api/v0.1/themes.js b/core/server/api/v0.1/themes.js index 1b515750fa..9cb19260da 100644 --- a/core/server/api/v0.1/themes.js +++ b/core/server/api/v0.1/themes.js @@ -54,7 +54,7 @@ themes = { if (!loadedTheme) { return Promise.reject(new common.errors.ValidationError({ message: common.i18n.t('notices.data.validation.index.themeCannotBeActivated', {themeName: themeName}), - context: 'active_theme' + errorDetails: newSettings })); } diff --git a/core/server/api/v2/themes.js b/core/server/api/v2/themes.js index de84e8f177..91c7fb64b3 100644 --- a/core/server/api/v2/themes.js +++ b/core/server/api/v2/themes.js @@ -45,7 +45,7 @@ module.exports = { if (!loadedTheme) { return Promise.reject(new common.errors.ValidationError({ message: common.i18n.t('notices.data.validation.index.themeCannotBeActivated', {themeName: themeName}), - context: 'active_theme' + errorDetails: newSettings })); }