Skip to content

Commit

Permalink
fix(node): report render error to the terminal (#8599)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy authored Sep 20, 2023
1 parent 7147122 commit 2a0e908
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/integrations/node/src/nodeMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2a0e908

Please sign in to comment.