Browse Source

log error if http code not available

jomo 9 years ago
parent
commit
cc2840ae4b
1 changed files with 1 additions and 2 deletions
  1. 1 2
      lib/networking.js

+ 1 - 2
lib/networking.js

@@ -75,8 +75,7 @@ exp.get_from_options = function(rid, url, options, callback) {
     var code = response && response.statusCode;
 
     var logfunc = code && code < 405 ? logging.debug : logging.warn;
-    logfunc(rid, url, code, http_code[code]);
-
+    logfunc(rid, url, code || error && error.code, http_code[code]);
 
     switch (code) {
       case 200: