Socket
Socket
Sign inDemoInstall

eh-api-client

Package Overview
Dependencies
50
Maintainers
2
Versions
97
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.32.0 to 0.33.0

15

lib/client.js

@@ -215,4 +215,5 @@ var

Client.prototype._tryRequest = function(params, numTry, cb) {
Client.prototype._tryRequest = function(params, tryErrorHistory, cb) {
var startTime = new Date().getTime();
var numTry = tryErrorHistory.length + 1;
debuglog("Try(" + numTry + "): ", params);

@@ -248,3 +249,4 @@ var retryOptions = this._factory.retryOptions;

try: numTry,
strategySupported: strategySupported
strategySupported: strategySupported,
tryErrorHistory: tryErrorHistory
};

@@ -256,6 +258,6 @@ var debugParams = _.clone(params);

}
numTry++;
tryErrorHistory.push(err);
// retry
return setTimeout(function() {
self._tryRequest(params, numTry, cb);
self._tryRequest(params, tryErrorHistory, cb);
}, retryOptions.retryDelay);

@@ -266,3 +268,4 @@ }

res.retryInfo = {
try: numTry
try: numTry,
tryErrorHistory: tryErrorHistory
};

@@ -285,3 +288,3 @@ }

}).then(function() {
return self._tryRequest(params, 1, cb);
return self._tryRequest(params, [], cb);
});

@@ -288,0 +291,0 @@ };

2

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

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -88,2 +88,6 @@ var

err.retryInfo.strategySupported.should.equal(true);
err.retryInfo.tryErrorHistory.length.should.equal(err.retryInfo.try - 1);
err.retryInfo.tryErrorHistory.forEach(function(err) {
err.message.should.equal("ETIMEDOUT");
});
done();

@@ -90,0 +94,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc