FIX: error reporting when adding a watched word
This commit is contained in:
parent
02590feb4d
commit
74834dddea
|
@ -33,9 +33,9 @@ export default Ember.Component.extend({
|
||||||
Ember.run.schedule('afterRender', () => this.$('.watched-word-input').focus());
|
Ember.run.schedule('afterRender', () => this.$('.watched-word-input').focus());
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
this.set('formSubmitted', false);
|
this.set('formSubmitted', false);
|
||||||
const msg = (e.responseJSON && e.responseJSON.errors) ?
|
const msg = (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) ?
|
||||||
I18n.t("generic_error_with_reason", {error: e.responseJSON.errors.join('. ')}) :
|
I18n.t("generic_error_with_reason", {error: e.jqXHR.responseJSON.errors.join('. ')}) :
|
||||||
I18n.t("generic_error");
|
I18n.t("generic_error");
|
||||||
bootbox.alert(msg, () => this.$('.watched-word-input').focus());
|
bootbox.alert(msg, () => this.$('.watched-word-input').focus());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue