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