shipit
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -22,9 +22,15 @@ (function() { | ||
validateResponse(response, cb) { | ||
response = JSON.parse(response); | ||
if (response['Events'] == null) { | ||
return cb({ | ||
error: 'missing events' | ||
}); | ||
var error; | ||
try { | ||
response = JSON.parse(response); | ||
if (response['Events'] == null) { | ||
return cb({ | ||
error: 'missing events' | ||
}); | ||
} | ||
return cb(null, response); | ||
} catch (error1) { | ||
error = error1; | ||
return cb(crror); | ||
} | ||
return cb(null, response); | ||
} | ||
@@ -31,0 +37,0 @@ |
{ | ||
"name": "shipit", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "This module allows you to connect to many shipping carriers like UPS and FedEx and download tracking data for your packages in a common schema", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
103817
2471