From 67aaf50f2641ddbd7886affd7837af974f2dba98 Mon Sep 17 00:00:00 2001 From: HardiReady Date: Sat, 20 Oct 2018 20:33:36 +0200 Subject: [PATCH] Add error output on http service get --- api/routes/slotting.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/routes/slotting.js b/api/routes/slotting.js index 7243209..e8abc97 100644 --- a/api/routes/slotting.js +++ b/api/routes/slotting.js @@ -38,6 +38,10 @@ const getHtml = (options, onResult) => { onResult(res.statusCode, output); } }); + + res.on('error', (err) => { + onResult(500, err); + }); }); req.end(); };