Socket
Socket
Sign inDemoInstall

eh-api-client

Package Overview
Dependencies
54
Maintainers
2
Versions
96
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.48.3 to 0.49.0

14

index.js

@@ -26,8 +26,12 @@ var

retryStrategy: function(err, params) {
if(params && params.method && params.method.toLowerCase() !== "get") {
return false;
const method = params && params.method && params.method.toLowerCase() || ''
if (err.code === 'EAI_AGAIN' || err.code === 'EHOSTUNREACH') {
// for this kind of errors the request definitely has not reached the destionation
return true
}
// only retry if got an ECONNRESET/ETIMEDOUT/ESOCKETTIMEDOUT/EAI_AGAIN/ECONNREFUSED error
// https://man7.org/linux/man-pages/man3/errno.3.html
return err.code === "ECONNRESET" || err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === 'EAI_AGAIN' || err.code === 'ECONNREFUSED';
if(method === "get") {
// https://man7.org/linux/man-pages/man3/errno.3.html
return err.code === "ECONNRESET" || err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === 'ECONNREFUSED';
}
return false
}

@@ -34,0 +38,0 @@ };

{
"name": "eh-api-client",
"version": "0.48.3",
"version": "0.49.0",
"description": "Node.js rest client",

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

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