Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/execution-grid-client

Package Overview
Dependencies
Maintainers
30
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/execution-grid-client - npm Package Compare versions

Comparing version 1.1.13 to 1.1.14

23

dist/tunnel.js

@@ -44,7 +44,7 @@ "use strict";

const response = await (0, node_fetch_1.default)(request);
const body = await response.json();
const body = await response.json().catch(() => null);
if (response.status === 201)
return body;
if (!RETRY_ERROR_CODES.includes(body === null || body === void 0 ? void 0 : body.message)) {
logger.error(`Failed to create tunnel with code ${(_a = body === null || body === void 0 ? void 0 : body.message) !== null && _a !== void 0 ? _a : 'UNKNOWN_ERROR'}`);
if (!RETRY_ERROR_CODES.includes(body === null || body === void 0 ? void 0 : body.message) && response.status >= 400 && response.status < 500) {
logger.error(`Failed to create tunnel with status ${response.status} and code ${(_a = body === null || body === void 0 ? void 0 : body.message) !== null && _a !== void 0 ? _a : 'UNKNOWN_ERROR'}`);
throw new Error(`Failed to create tunnel with code ${(_b = body === null || body === void 0 ? void 0 : body.message) !== null && _b !== void 0 ? _b : 'UNKNOWN_ERROR'}`);

@@ -63,7 +63,14 @@ }

});
const response = await (0, node_fetch_1.default)(request);
if (response.status !== 200) {
const body = await response.json();
logger.error(`Failed to delete tunnel with code ${(_a = body === null || body === void 0 ? void 0 : body.message) !== null && _a !== void 0 ? _a : 'UNKNOWN_ERROR'}`);
throw new Error(`Failed to delete tunnel with code ${(_b = body === null || body === void 0 ? void 0 : body.message) !== null && _b !== void 0 ? _b : 'UNKNOWN_ERROR'}`);
let attempt = 0;
while (true) {
const response = await (0, node_fetch_1.default)(request);
if (response.status === 200)
return;
if (response.status >= 400 && response.status < 500) {
const body = await response.json().catch(() => null);
logger.error(`Failed to delete tunnel with status ${response.status} and code ${(_a = body === null || body === void 0 ? void 0 : body.message) !== null && _a !== void 0 ? _a : 'UNKNOWN_ERROR'}`);
throw new Error(`Failed to delete tunnel with code ${(_b = body === null || body === void 0 ? void 0 : body.message) !== null && _b !== void 0 ? _b : 'UNKNOWN_ERROR'}`);
}
await utils.general.sleep(RETRY_BACKOFF[Math.min(attempt, RETRY_BACKOFF.length - 1)]);
attempt += 1;
}

@@ -70,0 +77,0 @@ }

{
"name": "@applitools/execution-grid-client",
"version": "1.1.13",
"version": "1.1.14",
"description": "",

@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE",

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