@t2000/engine 1.25.2 → 1.25.3

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/index.js CHANGED
@@ -1110,7 +1110,7 @@ function parseNumberOrNull(input) {
1110
1110
  const n = Number(input);
1111
1111
  return Number.isFinite(n) ? n : null;
1112
1112
  }
1113
- var DEFI_PORTFOLIO_TIMEOUT_MS = 4e3;
1113
+ var DEFI_PORTFOLIO_TIMEOUT_MS = 2e3;
1114
1114
  var DEFI_FRESH_TTL_MS_BLOCKVISION = 6e4;
1115
1115
  var DEFI_FRESH_TTL_MS_PARTIAL = 15e3;
1116
1116
  var DEFI_FRESH_TTL_MS_PARTIAL_STALE = 0;
@@ -1334,6 +1334,10 @@ async function fetchOneDefiProtocol(address, protocol, apiKey, retryStats) {
1334
1334
  { signal, retryStats }
1335
1335
  );
1336
1336
  } catch (err) {
1337
+ const errName = err?.name;
1338
+ if (errName === "AbortError" || errName === "TimeoutError") {
1339
+ getTelemetrySink().counter("defi.protocol_timeout_count", { protocol });
1340
+ }
1337
1341
  console.warn(`[defi] ${protocol} fetch threw:`, err);
1338
1342
  return null;
1339
1343
  }