Skip to content

Commit

Permalink
fix(node): add missing error logging (#11202)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkobierski authored Jun 7, 2024
1 parent 368e4ce commit d0248bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-worms-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/node': patch
---

Fixes suppressed logs when error occurs
2 changes: 2 additions & 0 deletions packages/integrations/node/src/serve-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export function createAppHandler(app: NodeApp): RequestHandler {
try {
request = NodeApp.createRequest(req);
} catch (err) {
logger.error(`Could not render ${req.url}`);
console.error(err);
res.statusCode = 500;
res.end('Internal Server Error');
return;
Expand Down

0 comments on commit d0248bc

Please sign in to comment.