open-nomad/ui/app/mixins/with-model-error-handling.js

11 lines
223 B
JavaScript
Raw Normal View History

2017-09-28 17:59:59 +00:00
import Ember from 'ember';
import notifyError from 'nomad-ui/utils/notify-error';
const { Mixin } = Ember;
export default Mixin.create({
model() {
return this._super(...arguments).catch(notifyError(this));
},
});