github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/mixins/with-model-error-handling.js (about)

     1  import Mixin from '@ember/object/mixin';
     2  import notifyError from 'nomad-ui/utils/notify-error';
     3  
     4  // eslint-disable-next-line ember/no-new-mixins
     5  export default Mixin.create({
     6    model() {
     7      return this._super(...arguments).catch(notifyError(this));
     8    },
     9  });