producteca-sdk
Advanced tools
Comparing version 8.10.0 to 8.11.0
(function() { | ||
var Client, Promise, _, debug, request, | ||
var Client, Promise, _, debug, debugResponse, debugResponseError, request, | ||
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | ||
@@ -11,2 +11,6 @@ | ||
debugResponse = require("debug")("producteca-sdk:client:response"); | ||
debugResponseError = require("debug")("producteca-sdk:client:response:error"); | ||
request = require("request-promise"); | ||
@@ -78,3 +82,11 @@ | ||
debug(JSON.stringify(options)); | ||
return request(options).promise(); | ||
return request(options).promise().tap((function(_this) { | ||
return function(response) { | ||
return debugResponse(JSON.stringify(response)); | ||
}; | ||
})(this)).tapCatch((function(_this) { | ||
return function(err) { | ||
return debugResponseError(JSON.stringify(err.message || err.body || err.code || err.error || err)); | ||
}; | ||
})(this)); | ||
}; | ||
@@ -81,0 +93,0 @@ |
{ | ||
"name": "producteca-sdk", | ||
"version": "8.10.0", | ||
"version": "8.11.0", | ||
"description": "SDK for querying the Producteca's API", | ||
@@ -5,0 +5,0 @@ "main": "build/sdk.js", |
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
37661
883