Handle allocation 404s

This commit is contained in:
Michael Lange 2017-09-28 10:59:59 -07:00
parent 9d9d66b1a7
commit ca0b297d47
3 changed files with 18 additions and 6 deletions

View file

@ -0,0 +1,10 @@
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));
},
});

View file

@ -0,0 +1,6 @@
import Ember from 'ember';
import WithModelErrorHandling from 'nomad-ui/mixins/with-model-error-handling';
const { Route } = Ember;
export default Route.extend(WithModelErrorHandling);

View file

@ -1,10 +1,6 @@
import Ember from 'ember';
import notifyError from 'nomad-ui/utils/notify-error';
import WithModelErrorHandling from 'nomad-ui/mixins/with-model-error-handling';
const { Route } = Ember;
export default Route.extend({
model() {
return this._super(...arguments).catch(notifyError(this));
},
});
export default Route.extend(WithModelErrorHandling);