From e2bb09850baef99d5fff45e681ca00ea5b59978a Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Wed, 29 Aug 2018 10:33:42 -0700 Subject: [PATCH] Express Errors with res.marko API (#1119) * Emit express errors with res.marko * Switch to using '.on' instead of catch to prevent unhandled promise rejections --- src/express.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/express.js b/src/express.js index c99129252..44706cb4f 100644 --- a/src/express.js +++ b/src/express.js @@ -55,7 +55,6 @@ function patchResponse(response) { } res.set({ "content-type": "text/html; charset=utf-8" }); - - return template.render(data, res); + return template.render(data, res).on("error", req.next); }; }