Skip to content

Commit

Permalink
Improved error context usage
Browse files Browse the repository at this point in the history
refs #10571

- Change was done to avoid usage of hardcoded value and provide more context. Additionally errorDetails are formatted in a readable way
  • Loading branch information
naz committed Apr 23, 2019
1 parent 63337dd commit cb322fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/server/api/v0.1/themes.js
Expand Up @@ -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
}));
}

Expand Down
2 changes: 1 addition & 1 deletion core/server/api/v2/themes.js
Expand Up @@ -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
}));
}

Expand Down

0 comments on commit cb322fc

Please sign in to comment.