diff --git a/app/routes/team.js b/app/routes/team.js index a0c9d16b2b2..2c4ed4f5fc4 100644 --- a/app/routes/team.js +++ b/app/routes/team.js @@ -21,10 +21,12 @@ export default Route.extend({ return { crates, team }; } catch (e) { - if (e.errors.some(e => e.detail === 'Not Found')) { + if (e.errors?.some(e => e.detail === 'Not Found')) { this.notifications.error(`Team '${params.team_id}' does not exist`); return this.replaceWith('index'); } + + throw e; } }, }); diff --git a/app/routes/user.js b/app/routes/user.js index 2a53db576e4..9bd16794e54 100644 --- a/app/routes/user.js +++ b/app/routes/user.js @@ -20,10 +20,12 @@ export default Route.extend({ return { crates, user }; } catch (e) { - if (e.errors.some(e => e.detail === 'Not Found')) { + if (e.errors?.some(e => e.detail === 'Not Found')) { this.notifications.error(`User '${params.user_id}' does not exist`); return this.replaceWith('index'); } + + throw e; } }, });