Add error output on http service get

pull/47/head
HardiReady 2018-10-20 20:33:36 +02:00
parent c0b3e27d18
commit 67aaf50f26
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@ const getHtml = (options, onResult) => {
onResult(res.statusCode, output); onResult(res.statusCode, output);
} }
}); });
res.on('error', (err) => {
onResult(500, err);
});
}); });
req.end(); req.end();
}; };