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

This commit is contained in:
AJ ONeal 2018-08-24 23:53:29 -06:00
부모 ca2e5cdb99
커밋 efd7693dcd
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@ -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",