FIX: Display proper error on badge create

This commit is contained in:
Robin Ward 2015-05-21 16:05:48 -04:00
parent 91588bed8b
commit 381784ea62

View File

@ -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', '');
});
}
},