Skip to content

Commit 07263b7

Browse files
committed
Merge pull request #37 from FullstackAcademy/better-error-logs
Log stack trace for server errors
2 parents 7316fd5 + 8f5c643 commit 07263b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

generated/server/app/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ app.get('/*', function (req, res) {
3535

3636
// Error catching endware.
3737
app.use(function (err, req, res, next) {
38-
console.error(err, typeof next);
38+
console.error(err)
39+
console.error(err.stack);
3940
res.status(err.status || 500).send(err.message || 'Internal server error.');
4041
});

0 commit comments

Comments
 (0)