diff options
-rwxr-xr-x | webserver.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webserver.js b/webserver.js index aecca12..5ebdc41 100755 --- a/webserver.js +++ b/webserver.js @@ -199,8 +199,9 @@ app.get("/goioi", function (req, res) { // Error-handling middleware app.use(function (err, req, res, next) { const id = new Date().getTime().toString() + Math.random().toFixed(10).slice(2); - console.log("Error caught in app: (id=" + id + ")"); - console.log(err.stack); + console.error("Error caught in app: (id=" + id + ")"); + console.error(err); + console.error(err.stack); res.status(500).end("An internal error occurred; it has been logged with id " + id + ".\n"); }); |