diff --git a/lib/deps/ajax.js b/lib/deps/ajax.js
index <HASH>..<HASH> 100644
--- a/lib/deps/ajax.js
+++ b/lib/deps/ajax.js
@@ -74,6 +74,11 @@ function ajax(options, adapterCallback) {
 
   function onError(err, cb) {
     var errParsed, errObj, errType, key;
+    if (err.code && err.status) {
+      var err2 = new Error(err.message || err.code);
+      err2.status = err.status;
+      return cb(err2);
+    }
     try {
       errParsed = JSON.parse(err.responseText);
       //would prefer not to have a try/catch clause
(#<I>) - pass back node http errors