From 352a9aeccd32465b865dd07ba3e93e52ae23efaa Mon Sep 17 00:00:00 2001 From: Alex Stelea Date: Fri, 26 Jul 2024 12:43:08 +0100 Subject: [PATCH] fix: retry FailedToFetch error --- .../dapp-toolkit/src/modules/gateway/gateway.module.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/dapp-toolkit/src/modules/gateway/gateway.module.ts b/packages/dapp-toolkit/src/modules/gateway/gateway.module.ts index 33e45664..75f6de9e 100644 --- a/packages/dapp-toolkit/src/modules/gateway/gateway.module.ts +++ b/packages/dapp-toolkit/src/modules/gateway/gateway.module.ts @@ -64,6 +64,15 @@ export const GatewayModule = (input: { return }) .mapErr((response) => { + if (response.reason === 'FailedToFetch') { + logger?.debug({ + error: response, + context: 'unexpected error, retrying', + }) + retry.trigger.next() + return + } + logger?.debug(response) return SdkError( 'failedToPollSubmittedTransaction',