Comparing version 0.0.1 to 0.0.2
@@ -38,3 +38,3 @@ var request = require('request'), | ||
var data = JSON.parse(body); | ||
if (res.statusCode !== 200) return callback(new Error(data)); | ||
if (res.statusCode !== 200) return callback(util.formatError(data)); | ||
@@ -41,0 +41,0 @@ callback(null, data); |
@@ -51,3 +51,3 @@ var request = require('request'), | ||
var data = JSON.parse(body); | ||
if (res.statusCode !== 200) return callback(new Error(data)); | ||
if (res.statusCode !== 200) return callback(util.formatError(data)); | ||
@@ -54,0 +54,0 @@ callback(null, data); |
@@ -20,2 +20,6 @@ exports = module.exports = require('util'); | ||
return str; | ||
}; | ||
exports.formatError = function(data){ | ||
return new Error(data.message + ' (Code: ' + data.code + ')'); | ||
}; |
{ | ||
"name": "flurry-api", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Flurry APi", | ||
@@ -5,0 +5,0 @@ "main": "lib/flurry", |
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
5161
104