Skip to content

Commit

Permalink
fix: retry FailedToFetch error
Browse files Browse the repository at this point in the history
  • Loading branch information
xstelea committed Jul 26, 2024
1 parent ef4877c commit 352a9ae
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/dapp-toolkit/src/modules/gateway/gateway.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 352a9ae

Please sign in to comment.