0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

fix(node): add missing error logging (#11202)

This commit is contained in:
Dawid Kobierski 2024-06-07 11:26:16 +02:00 committed by GitHub
parent 368e4ced10
commit d0248bc083
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/node': patch
---
Fixes suppressed logs when error occurs

View file

@ -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;