+3
-2
@@ -145,3 +145,3 @@ "use strict"; | ||
| async function withRetries(identifier, apiName, fn, options = {}) { | ||
| var _a; | ||
| var _a, _b, _c, _d; | ||
| const { retries = 5, baseDelayMs = 125, onError } = options; | ||
@@ -167,4 +167,5 @@ logger_default.log(identifier, `Calling ${apiName} API with retries`); | ||
| } | ||
| const detail = ((_d = (_c = (_b = lastError == null ? void 0 : lastError.response) == null ? void 0 : _b.data) == null ? void 0 : _c.error) == null ? void 0 : _d.message) || (lastError == null ? void 0 : lastError.message) || String(lastError); | ||
| const error2 = new Error( | ||
| `Failed to call ${apiName} API after ${retries} attempts` | ||
| `Failed to call ${apiName} API after ${retries} attempts: ${detail}` | ||
| ); | ||
@@ -171,0 +172,0 @@ error2.cause = lastError; |
+3
-2
@@ -114,3 +114,3 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { | ||
| async function withRetries(identifier, apiName, fn, options = {}) { | ||
| var _a; | ||
| var _a, _b, _c, _d; | ||
| const { retries = 5, baseDelayMs = 125, onError } = options; | ||
@@ -136,4 +136,5 @@ logger_default.log(identifier, `Calling ${apiName} API with retries`); | ||
| } | ||
| const detail = ((_d = (_c = (_b = lastError == null ? void 0 : lastError.response) == null ? void 0 : _b.data) == null ? void 0 : _c.error) == null ? void 0 : _d.message) || (lastError == null ? void 0 : lastError.message) || String(lastError); | ||
| const error2 = new Error( | ||
| `Failed to call ${apiName} API after ${retries} attempts` | ||
| `Failed to call ${apiName} API after ${retries} attempts: ${detail}` | ||
| ); | ||
@@ -140,0 +141,0 @@ error2.cause = lastError; |
+1
-1
| { | ||
| "name": "190proof", | ||
| "version": "1.0.99", | ||
| "version": "1.0.100", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
363324
0.47%3214
0.06%