Skip to content

Commit 333bfc3

Browse files
committed
user: Fix error handling for errors without an errors property
1 parent 38415bd commit 333bfc3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/routes/user.js

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

2121
return { crates, user };
2222
} catch (e) {
23-
if (e.errors.some(e => e.detail === 'Not Found')) {
23+
if (e.errors?.some(e => e.detail === 'Not Found')) {
2424
this.notifications.error(`User '${params.user_id}' does not exist`);
2525
return this.replaceWith('index');
2626
}
27+
28+
throw e;
2729
}
2830
},
2931
});

0 commit comments

Comments
 (0)