Skip to content

Commit

Permalink
fix(@angular/build): show error message when error stack is undefined
Browse files Browse the repository at this point in the history
Handle cases where the error stack is missing by displaying a relevant message.

Closes #28590
  • Loading branch information
alan-agius4 committed Oct 8, 2024
1 parent 834925d commit 9233e5e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ async function getAllRoutes(
assertIsError(err);

return {
errors: [`An error occurred while extracting routes.\n\n${err.stack}`],
errors: [
`An error occurred while extracting routes.\n\n${err.stack ?? err.message ?? err.code ?? err}`,
],
serializedRouteTree: [],
};
} finally {
Expand Down

0 comments on commit 9233e5e

Please sign in to comment.