transporttycoon
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -48,3 +48,3 @@ "use strict"; | ||
this.tycoon.interceptors.response.use(undefined, async (error) => { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e, _f; | ||
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 402) { | ||
@@ -62,3 +62,5 @@ return Promise.reject({ msg: '[TransportTycoon] You are out of API charges!', code: 'no_charges' }); | ||
} | ||
if ((error === null || error === void 0 ? void 0 : error.code) === 'ECONNABORTED' && (error === null || error === void 0 ? void 0 : error.config)) { | ||
if (((error === null || error === void 0 ? void 0 : error.code) === 'ECONNABORTED' || (error === null || error === void 0 ? void 0 : error.code) === 'ECONNRESET') && (error === null || error === void 0 ? void 0 : error.config)) { | ||
if ((error === null || error === void 0 ? void 0 : error.code) === 'ECONNRESET' && ((_f = (_e = error === null || error === void 0 ? void 0 : error.config) === null || _e === void 0 ? void 0 : _e.url) === null || _f === void 0 ? void 0 : _f.includes('http://'))) | ||
return Promise.reject(error); | ||
this.settings.serverIndex++; | ||
@@ -65,0 +67,0 @@ if (this.settings.serverIndex > tycoonServers.length - 1) |
{ | ||
"name": "transporttycoon", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Wrapper for the Transport Tycoon FiveM server API", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.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
30190
900