mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Merge pull request #3738 from felixrieseberg/iss3728
Error notification if send test mail returns 500
This commit is contained in:
commit
801ca568e4
1 changed files with 7 additions and 3 deletions
|
@ -50,9 +50,13 @@ var DebugController = Ember.Controller.extend(Ember.Evented, {
|
||||||
ic.ajax.request(this.get('ghostPaths.url').api('mail', 'test'), {
|
ic.ajax.request(this.get('ghostPaths.url').api('mail', 'test'), {
|
||||||
type: 'POST'
|
type: 'POST'
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
self.notifications.showSuccess('Check your email for the test message:');
|
self.notifications.showSuccess('Check your email for the test message.');
|
||||||
}).catch(function (response) {
|
}).catch(function (error) {
|
||||||
self.notifications.showErrors(response);
|
if (typeof error.jqXHR !== 'undefined') {
|
||||||
|
self.notifications.showAPIError(error);
|
||||||
|
} else {
|
||||||
|
self.notifications.showErrors(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue