mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: show meaningful error message in case of site setting error
This commit is contained in:
parent
7ab8827c7e
commit
e287046d32
@ -65,8 +65,8 @@ export default Ember.Component.extend(BufferedContent, Discourse.ScrollTop, {
|
||||
self.set('validationMessage', null);
|
||||
self.commitBuffer();
|
||||
}).catch(function(e) {
|
||||
if (e.responseJSON && e.responseJSON.errors) {
|
||||
self.set('validationMessage', e.responseJSON.errors[0]);
|
||||
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||
self.set('validationMessage', e.jqXHR.responseJSON.errors[0]);
|
||||
} else {
|
||||
self.set('validationMessage', I18n.t('generic_error'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user