diff --git a/lib/user/http_program.js b/lib/user/http_program.js index 991efd1..64fecc8 100644 --- a/lib/user/http_program.js +++ b/lib/user/http_program.js @@ -75,6 +75,10 @@ exports.request = function(options, next) { options.response = res.body; next(res); }); + req.on('error', function(err) { + // might as well do something. + next({res: {statusCode: 499}}); + }); }; // Sets the hostname and port (port optional)