cocoda-sdk 3.6.3 → 3.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.cjs
CHANGED
|
@@ -351,7 +351,7 @@ __export(providers_exports, {
|
|
|
351
351
|
// src/providers/base-provider.js
|
|
352
352
|
var import_jskos_tools = __toESM(require("jskos-tools"), 1);
|
|
353
353
|
var import_axios = __toESM(require("axios"), 1);
|
|
354
|
-
var intersection = (
|
|
354
|
+
var intersection = (a1, a2) => a1.filter((x) => a2.includes(x));
|
|
355
355
|
var BaseProvider = class {
|
|
356
356
|
static providerName = "Base";
|
|
357
357
|
/**
|
|
@@ -439,9 +439,8 @@ var BaseProvider = class {
|
|
|
439
439
|
return data3;
|
|
440
440
|
}, (error) => {
|
|
441
441
|
const count = error.config?._retryCount ?? 0;
|
|
442
|
-
const method = error.config.method;
|
|
443
442
|
const statusCode = error.response?.status;
|
|
444
|
-
if (this._retryConfig.methods.includes(method) && this._retryConfig.statusCodes.includes(statusCode) && count < this._retryConfig.count) {
|
|
443
|
+
if (this._retryConfig.methods.includes(error.config?.method) && this._retryConfig.statusCodes.includes(statusCode) && count < this._retryConfig.count) {
|
|
445
444
|
error.config._retryCount = count + 1;
|
|
446
445
|
if (error.config.data) {
|
|
447
446
|
error.config.data = JSON.parse(error.config.data);
|