Socket
Socket
Sign inDemoInstall

eh-api-client

Package Overview
Dependencies
Maintainers
2
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eh-api-client - npm Package Compare versions

Comparing version 0.20.0 to 0.21.0

9

lib/client.js
var
Q = require("q"),
request = require("request"),
_ = require("lodash");
_ = require("lodash"),
debuglog = require("util").debuglog("eh-api-client");

@@ -96,2 +97,3 @@ var methods = [

}
debuglog("Client.request", method, options, body);
if(method === "GET" && typeof body === "object") {

@@ -155,2 +157,4 @@ // body is options for GET request

_res = res;
debuglog("Client.request complete", method, options);
debuglog("Client.request response error", err);
if(err) {

@@ -177,2 +181,3 @@ return deferred.reject(buildNetworkError(res, err, reqParams.url, method));

Client.prototype._tryRequest = function(params, numTry, cb) {
debuglog("Request(" + numTry + "): ", params);
var retryOptions = this._factory.retryOptions;

@@ -183,4 +188,6 @@ var self = this;

if(err && retryOptions) {
debuglog("Request got an error ", err);
numTry++;
if(numTry >= retryOptions.maxAttempts || !retryOptions.retryStrategy(err)) {
debuglog("Too much attempts with", err);
err.retryInfo = {

@@ -187,0 +194,0 @@ try: numTry

5

package.json
{
"name": "eh-api-client",
"version": "0.20.0",
"version": "0.21.0",
"description": "Node.js rest client",

@@ -13,2 +13,5 @@ "main": "index.js",

},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"author": "calibr <awcalibr@gmail.com>",

@@ -15,0 +18,0 @@ "license": "ISC",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc