projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
866842c
)
Do not show full stack in case of error
author
Benjamin Auder
<benjamin.auder@somewhere>
Thu, 20 Feb 2020 12:24:15 +0000
(13:24 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Thu, 20 Feb 2020 12:24:15 +0000
(13:24 +0100)
server/app.js
patch
|
blob
|
blame
|
history
diff --git
a/server/app.js
b/server/app.js
index
b8a6aec
..
eced7d3
100644
(file)
--- a/
server/app.js
+++ b/
server/app.js
@@
-55,10
+55,11
@@
app.use(function(req, res, next) {
// error handler
app.use(function(err, req, res, next) {
res.status(err.status || 500);
+ if (app.get('env') === 'development')
+ console.log(err.stack);
res.send(
"<h1>" + err.message + "</h1>" +
- "<h2>" + err.status + "</h2>" +
- "<pre>" + err.stack + "</pre>"
+ "<h2>" + err.status + "</h2>"
);
});