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:
parent
368e4ced10
commit
d0248bc083
2 changed files with 7 additions and 0 deletions
5
.changeset/nervous-worms-sort.md
Normal file
5
.changeset/nervous-worms-sort.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/node': patch
|
||||
---
|
||||
|
||||
Fixes suppressed logs when error occurs
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue