Comparing version 2.7.0 to 2.7.1
11
index.js
@@ -20,3 +20,3 @@ 'use strict'; | ||
NestedError.call(this, message, nested); | ||
objectAssign(this, nested); | ||
objectAssign(this, nested, {nested: this.nested}); | ||
} | ||
@@ -112,2 +112,11 @@ | ||
err.code = statusCode; | ||
if (data && json) { | ||
try { | ||
data = JSON.parse(data); | ||
} catch (e) { | ||
err = new GotError('Parsing ' + url + ' response failed', new GotError(e.message, err)); | ||
} | ||
} | ||
cb(err, data, response); | ||
@@ -114,0 +123,0 @@ }); |
{ | ||
"name": "got", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "Simplified HTTP/HTTPS requests", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9843
167