FIX: show error msg on grant badge if message available from backend (#6801)

This commit is contained in:
Saurabh Patel
2018-12-31 15:16:39 +05:30
committed by Régis Hanol
parent 1381dc603d
commit 0fca3205b5
2 changed files with 4 additions and 4 deletions
@@ -1,4 +1,5 @@
import GrantBadgeController from "discourse/mixins/grant-badge-controller";
import { popupAjaxError } from "discourse/lib/ajax-error";
export default Ember.Controller.extend(GrantBadgeController, {
adminUser: Ember.inject.controller(),
@@ -70,9 +71,8 @@ export default Ember.Controller.extend(GrantBadgeController, {
}
});
},
function() {
// Failure
bootbox.alert(I18n.t("generic_error"));
function(error) {
popupAjaxError(error);
}
);
},