From 802075f83c8026e208bba7b7d15810878057678e Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 24 Jan 2019 18:41:14 +0100 Subject: [PATCH] log errors when trying to serve fonts --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 9f0de6015..75cd065d1 100644 --- a/server.js +++ b/server.js @@ -215,7 +215,8 @@ var FONT_NAME_MAP = {}; app.use("/common/onlyoffice/fonts/odttf/:name", function (req, res) { var name = req.params.name.replace(/\.js$/, '').toLowerCase(); var path = Path.join('./www/common/onlyoffice/fonts/odttf/', name); - Fs.createReadStream(path).pipe(res).on('error', function () { + Fs.createReadStream(path).pipe(res).on('error', function (e) { + console.error(e); res.status(404).send('No such font'); }); });