v2.4.6 respond with 500 on unhandled exception from user's HTTP handler
This commit is contained in:
parent
ca2e5cdb99
commit
efd7693dcd
7
index.js
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)
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
|
@ -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…
Reference in New Issue