Fix a potential error issue with get-info's domain

This commit is contained in:
calzoneman 2014-01-02 22:38:12 -05:00
parent 8b383e0bdb
commit 234b15831e
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ var urlRetrieve = function (transport, options, callback) {
// This should cut down on needing to restart the server // This should cut down on needing to restart the server
var d = domain.create(); var d = domain.create();
d.on("error", function (err) { d.on("error", function (err) {
Logger.errlog.log(err.trace()); if (typeof err.trace === "function") {
Logger.errlog.log(err.trace());
}
Logger.errlog.log("urlRetrieve failed: " + err); Logger.errlog.log("urlRetrieve failed: " + err);
Logger.errlog.log("Request was: " + options.host + options.path); Logger.errlog.log("Request was: " + options.host + options.path);
callback(503, err); callback(503, err);