mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed undefined
showing up in setup/two errors
This commit is contained in:
parent
f3cfafe6ac
commit
0f46321565
1 changed files with 2 additions and 2 deletions
|
@ -162,7 +162,7 @@ export default Controller.extend(ValidationEngine, {
|
||||||
_handleSaveError(resp) {
|
_handleSaveError(resp) {
|
||||||
if (isInvalidError(resp)) {
|
if (isInvalidError(resp)) {
|
||||||
let [error] = resp.payload.errors;
|
let [error] = resp.payload.errors;
|
||||||
this.set('flowErrors', `${error.message} ${error.context}`);
|
this.set('flowErrors', [error.message, error.context].join(' '));
|
||||||
} else {
|
} else {
|
||||||
this.notifications.showAPIError(resp, {key: 'setup.blog-details'});
|
this.notifications.showAPIError(resp, {key: 'setup.blog-details'});
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ export default Controller.extend(ValidationEngine, {
|
||||||
_handleAuthenticationError(error) {
|
_handleAuthenticationError(error) {
|
||||||
if (error && error.payload && error.payload.errors) {
|
if (error && error.payload && error.payload.errors) {
|
||||||
let [apiError] = error.payload.errors;
|
let [apiError] = error.payload.errors;
|
||||||
this.set('flowErrors', `${apiError.message} ${apiError.context}`);
|
this.set('flowErrors', [apiError.message, apiError.context].join(' '));
|
||||||
} else {
|
} else {
|
||||||
// Connection errors don't return proper status message, only req.body
|
// Connection errors don't return proper status message, only req.body
|
||||||
this.notifications.showAlert('There was a problem on the server.', {type: 'error', key: 'setup.authenticate.failed'});
|
this.notifications.showAlert('There was a problem on the server.', {type: 'error', key: 'setup.authenticate.failed'});
|
||||||
|
|
Loading…
Add table
Reference in a new issue