Skip to content

Instantly share code, notes, and snippets.

@naugtur
Created August 26, 2014 08:51
Show Gist options
  • Select an option

  • Save naugtur/0e56140fde524612b89e to your computer and use it in GitHub Desktop.

Select an option

Save naugtur/0e56140fde524612b89e to your computer and use it in GitHub Desktop.
regressin in xhr
//put all dependencies inplace, install beefy and run `beefy thisfile`
var oldxhr = require("./x1.14.1.js");
var newxhr = require("./x1.15.0.js");
var opts = {
"method": "GET",
"url": "https://naugtur.egnyte.com/pubapi/v1/fs/Private/naugtur/foo"
}
oldxhr(opts, function (error, response, body) {
console.log("old",error.message);
//old <h1>Developer Inactive</h1>
})
newxhr(opts, function (error, response, body) {
console.log("new",error.message);
//new 4xx Client Error
})
@naugtur
Copy link
Author

naugtur commented Aug 26, 2014

The older version put response body in the error.message field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment