Skip to content

Commit

Permalink
Log errors to stderr (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning authored Oct 6, 2024
1 parent 0a414c6 commit e59e91b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/web-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function getEnv(req) {
}

function sendError(res, ex, prefix) {
console.error(ex);
const status =
ex && ex.message && /No such environment/.test(ex.message) ? 404 : 500;
res.status(status).send(`${prefix} -- ${ex.toString()}`);
Expand Down

0 comments on commit e59e91b

Please sign in to comment.