Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Improve theme validation error messaging #7253

Merged
merged 1 commit into from
Aug 24, 2016

Conversation

ErisDS
Copy link
Member

@ErisDS ErisDS commented Aug 23, 2016

refs #7204

  • Adds a new ThemeValidationError class
  • This error has a top level message, but will also contain all the individual errors within the errorDetails property
  • Updated the API error handling to return errorDetails if it is present

@@ -52,7 +52,8 @@ themes = {
if (error.failures) {
_.each(error.failures, function (childError) {
validationErrors.push(new errors.ValidationError(i18n.t('errors.api.themes.invalidTheme', {
reason: childError.ref
// @TODO use property, or some other mechanism to send & display multiple values here
reason: childError.message + ' (' + childError.ref + ')'

This comment was marked as abuse.

@ErisDS
Copy link
Member Author

ErisDS commented Aug 23, 2016

I will revisit this first thing in the am

@ErisDS ErisDS changed the title 🎨 Show message & ref theme validation info 🎨 Improve theme validation error messaging Aug 24, 2016
@ErisDS ErisDS changed the title 🎨 Improve theme validation error messaging [WIP] 🎨 Improve theme validation error messaging Aug 24, 2016
refs TryGhost#7204

- Adds a new ThemeValidationError class
- This error has a top level message, but will also contain all the individual errors within the `errorDetails` property
- Updated the API error handling to return `errorDetails` if it is present
@ErisDS
Copy link
Member Author

ErisDS commented Aug 24, 2016

Note: we should update gscan before the release. For some reason, greenkeeper isn't picking it up.

@kirrg001 kirrg001 added this to the 0.10.0 milestone Aug 24, 2016
@ErisDS ErisDS changed the title [WIP] 🎨 Improve theme validation error messaging 🎨 Improve theme validation error messaging Aug 24, 2016
@kirrg001
Copy link
Contributor

LGTM 👍 tested also in browser.
I will first merge gscan 0.0.11, then this here.

@kirrg001 kirrg001 merged commit 02ca986 into TryGhost:master Aug 24, 2016
@ErisDS ErisDS deleted the theme-validation branch August 24, 2016 15:14
mixonic pushed a commit to mixonic/Ghost that referenced this pull request Oct 28, 2016
refs TryGhost#7204

- Adds a new ThemeValidationError class
- This error has a top level message, but will also contain all the individual errors within the `errorDetails` property
- Updated the API error handling to return `errorDetails` if it is present
geekhuyang pushed a commit to geekhuyang/Ghost that referenced this pull request Nov 20, 2016
refs TryGhost#7204

- Adds a new ThemeValidationError class
- This error has a top level message, but will also contain all the individual errors within the `errorDetails` property
- Updated the API error handling to return `errorDetails` if it is present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants