mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:52:50 +08:00
FIX: Display proper error on badge create
This commit is contained in:
parent
91588bed8b
commit
381784ea62
|
@ -1,3 +1,4 @@
|
|||
import { popupAjaxError } from 'discourse/lib/ajax-error';
|
||||
import BufferedContent from 'discourse/mixins/buffered-content';
|
||||
|
||||
export default Ember.ObjectController.extend(BufferedContent, {
|
||||
|
@ -64,11 +65,9 @@ export default Ember.ObjectController.extend(BufferedContent, {
|
|||
self.set('savingStatus', I18n.t('saved'));
|
||||
}
|
||||
|
||||
}).catch(function(error) {
|
||||
self.set('savingStatus', I18n.t('failed'));
|
||||
self.send('saveError', error);
|
||||
}).finally(function() {
|
||||
}).catch(popupAjaxError).finally(function() {
|
||||
self.set('saving', false);
|
||||
self.set('savingStatus', '');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user