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

9 lines
211 B
JavaScript
Raw Normal View History

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