diff --git a/app/routes/crate.js b/app/routes/crate.js index 62b25bfc466..421802b3eee 100644 --- a/app/routes/crate.js +++ b/app/routes/crate.js @@ -4,9 +4,8 @@ export default Ember.Route.extend({ model(params) { return this.store.find('crate', params.crate_id).catch(e => { if (e.errors.any(e => e.detail === 'Not Found')) { - this.controllerFor('application').set('nextFlashError', `Crate '${params.crate_id}' does not exist`); - return this.replaceWith('index'); + return this.controllerFor('application').set('flashError', `Crate '${params.crate_id}' does not exist`); } }); - }, + } }); diff --git a/app/templates/crate/error.hbs b/app/templates/crate/error.hbs new file mode 100644 index 00000000000..31348e1f2c5 --- /dev/null +++ b/app/templates/crate/error.hbs @@ -0,0 +1 @@ +{{ title 'Crate Not Found' }}