@gearbox-protocol/sdk 10.7.0 → 10.7.1
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.
|
@@ -184,7 +184,15 @@ const retryCodes = /* @__PURE__ */ new Set([
|
|
|
184
184
|
const defaultShouldRetry = ({
|
|
185
185
|
error
|
|
186
186
|
}) => {
|
|
187
|
-
|
|
187
|
+
const callExError = error instanceof import_viem.BaseError && error.walk(
|
|
188
|
+
(e) => e instanceof import_viem.CallExecutionError && e.details === "header not found"
|
|
189
|
+
);
|
|
190
|
+
if (callExError && [
|
|
191
|
+
"unknown block",
|
|
192
|
+
"header not found",
|
|
193
|
+
"resource unavailable",
|
|
194
|
+
"requested resource not available"
|
|
195
|
+
].some((s) => callExError.details.toLowerCase().includes(s))) {
|
|
188
196
|
return true;
|
|
189
197
|
}
|
|
190
198
|
if ("code" in error && typeof error.code === "number") {
|
|
@@ -172,7 +172,15 @@ const retryCodes = /* @__PURE__ */ new Set([
|
|
|
172
172
|
const defaultShouldRetry = ({
|
|
173
173
|
error
|
|
174
174
|
}) => {
|
|
175
|
-
|
|
175
|
+
const callExError = error instanceof BaseError && error.walk(
|
|
176
|
+
(e) => e instanceof CallExecutionError && e.details === "header not found"
|
|
177
|
+
);
|
|
178
|
+
if (callExError && [
|
|
179
|
+
"unknown block",
|
|
180
|
+
"header not found",
|
|
181
|
+
"resource unavailable",
|
|
182
|
+
"requested resource not available"
|
|
183
|
+
].some((s) => callExError.details.toLowerCase().includes(s))) {
|
|
176
184
|
return true;
|
|
177
185
|
}
|
|
178
186
|
if ("code" in error && typeof error.code === "number") {
|