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
This commit is contained in:
Dylan Piercey 2018-08-29 10:33:42 -07:00 committed by GitHub
parent 38ee375ca3
commit e2bb09850b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
};
}