Add error output on http service get
parent
c0b3e27d18
commit
67aaf50f26
|
@ -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();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue