Reject with error on http server error
xyc opened this issue · 1 comments
xyc commented
Use case: When the port is already in use (for example in 9856), the library throws an uncaughtException. This prevents the upstream consumer from further handling the error.
Proposed fix is to add following error handler after
Lines 168 to 170 in c0271a6
httpOrHttpsServer.on('error', function(error) {
reject(error);
});
Reference:
https://stackoverflow.com/a/14470248
alallier commented
Thanks for the report, PRs welcomed