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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
337 B
JavaScript
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Mixin from '@ember/object/mixin';
2017-09-28 17:59:59 +00:00
import notifyError from 'nomad-ui/utils/notify-error';
// eslint-disable-next-line ember/no-new-mixins
2017-09-28 17:59:59 +00:00
export default Mixin.create({
model() {
return this._super(...arguments).catch(notifyError(this));
},
});