Browse Source

v2.4.6 respond with 500 on unhandled exception from user's HTTP handler

beta v2.4.6
AJ ONeal 6 years ago
parent
commit
efd7693dcd
  1. 7
      index.js
  2. 2
      package.json

7
index.js

@ -65,6 +65,13 @@ module.exports.create = function (opts) {
} catch(e) {
console.error("[error] [greenlock.app] Your HTTP handler had an uncaught error:");
console.error(e);
try {
res.statusCode = 500;
res.end("Internal Server Error: [Greenlock] HTTP exception logged for user-provided handler.");
} catch(e) {
// ignore
// (headers may have already been sent, etc)
}
}
})
);

2
package.json

@ -1,6 +1,6 @@
{
"name": "greenlock-express",
"version": "2.4.5",
"version": "2.4.6",
"description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.",
"main": "index.js",
"homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js",

Loading…
Cancel
Save