azure-kusto-data
Advanced tools
Comparing version 5.2.1 to 5.2.2
@@ -10,2 +10,3 @@ "use strict"; | ||
const axios_1 = __importDefault(require("axios")); | ||
const core_util_1 = require("@azure/core-util"); | ||
/** | ||
@@ -61,9 +62,12 @@ * This class holds data for all cloud instances, and returns the specific data instance by parsing the dns suffix from a URL | ||
catch (ex) { | ||
if (axios_1.default.isAxiosError(ex) && ((_a = ex.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
// For now as long not all proxies implement the metadata endpoint, if no endpoint exists return public cloud data | ||
this.cloudCache[kustoUri] = this.defaultCloudInfo; | ||
if (axios_1.default.isAxiosError(ex)) { | ||
// Axios library has a bug in browser, not propagating the status code, see: https://github.com/axios/axios/issues/5330 | ||
if ((((_a = ex.response) === null || _a === void 0 ? void 0 : _a.status) === 404 && core_util_1.isNode) || (ex.code === axios_1.default.AxiosError.ERR_NETWORK && !core_util_1.isNode)) { | ||
// For now as long not all proxies implement the metadata endpoint, if no endpoint exists return public cloud data | ||
this.cloudCache[kustoUri] = this.defaultCloudInfo; | ||
} | ||
else { | ||
throw new Error(`Failed to get cloud info for cluster ${kustoUri} - ${ex}`); | ||
} | ||
} | ||
else { | ||
throw new Error(`Failed to get cloud info for cluster ${kustoUri} - ${ex}`); | ||
} | ||
} | ||
@@ -70,0 +74,0 @@ return this.cloudCache[kustoUri]; |
@@ -20,2 +20,3 @@ { | ||
".playfabapi.com", | ||
".azureplayfab.com", | ||
".playfab.com", | ||
@@ -22,0 +23,0 @@ ".kusto.data.microsoft.com", |
{ | ||
"name": "azure-kusto-data", | ||
"version": "5.2.1", | ||
"version": "5.2.2", | ||
"description": "Azure Data Explorer Query SDK", | ||
@@ -62,3 +62,3 @@ "module": "dist-esm/src/index.js", | ||
"@types/uuid": "^8.3.4", | ||
"axios": "^0.27.2", | ||
"axios": "^1.6.0", | ||
"follow-redirects": "^1.15.1", | ||
@@ -72,3 +72,3 @@ "https-browserify": "^1.0.0", | ||
}, | ||
"gitHead": "47d85c627404235bd3f0ce7d69be56d07084c41e" | ||
"gitHead": "d6df72edb3a570c59a87af9337ea4c894fb998fc" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
254780
2489
+ Addedaxios@1.8.2(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
- Removedaxios@0.27.2(transitive)
Updatedaxios@^1.6.0