mirror of
https://github.com/withastro/astro.git
synced 2025-04-14 23:51:49 -05:00
fix(node): report render error to the terminal (#8599)
This commit is contained in:
parent
7147122dfa
commit
2a0e908af4
1 changed files with 3 additions and 0 deletions
|
@ -51,6 +51,9 @@ export default function (app: NodeApp, mode: Options['mode']) {
|
|||
await writeWebResponse(app, res, response);
|
||||
}
|
||||
} catch (err: unknown) {
|
||||
const logger = app.getAdapterLogger()
|
||||
logger.error(`Could not render ${req.url}`)
|
||||
console.error(err)
|
||||
if (!res.headersSent) {
|
||||
res.writeHead(500, `Server error`);
|
||||
res.end();
|
||||
|
|
Loading…
Add table
Reference in a new issue