Skip to content

Commit cb99acc

Browse files
committed
team: Fix error handling for errors without an errors property
1 parent 125b898 commit cb99acc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/routes/team.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ export default Route.extend({
2121

2222
return { crates, team };
2323
} catch (e) {
24-
if (e.errors.some(e => e.detail === 'Not Found')) {
24+
if (e.errors?.some(e => e.detail === 'Not Found')) {
2525
this.notifications.error(`Team '${params.team_id}' does not exist`);
2626
return this.replaceWith('index');
2727
}
28+
29+
throw e;
2830
}
2931
},
3032
});

0 commit comments

Comments
 (0)