Comparing version 1.1.3 to 1.1.4
@@ -115,7 +115,14 @@ /** | ||
var error = null; | ||
if (err || (response.statusCode < 200 || response.statusCode > 206)) { | ||
error = { status: response.statusCode }; | ||
error.message = data ? data.message : 'HTTP request error, check response for more info'; | ||
error.code = data && data.code; | ||
error.moreInfo = data && data.more_info; | ||
if (err || (response && (response.statusCode < 200 || response.statusCode > 206))) { | ||
error = {}; | ||
// response is null if server is unreachable | ||
if (response) { | ||
error.status = response.statusCode; | ||
error.message = data ? data.message : 'Unable to complete HTTP request'; | ||
error.code = data && data.code; | ||
error.moreInfo = data && data.more_info; | ||
} else { | ||
error.status = err.code; | ||
error.message = 'Unable to reach host: "'+client.host+'"'; | ||
} | ||
} | ||
@@ -122,0 +129,0 @@ |
{ | ||
"name":"twilio", | ||
"description":"A Twilio helper library", | ||
"version":"1.1.3", | ||
"version":"1.1.4", | ||
"author":"Kevin Whinnery <kevin.whinnery@gmail.com>", | ||
@@ -6,0 +6,0 @@ "contributors":[ |
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
42755
797