Skip to content

Commit

Permalink
handle retry case when inject failed to unknown node
Browse files Browse the repository at this point in the history
  • Loading branch information
urnotsam authored and mhanson-github committed Jul 12, 2024
1 parent 222b011 commit 575a8ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,9 @@ async function injectWithRetries(txHash: string, tx: any, args: any, retries = c
} else if (result.reason === 'Node not active. Rejecting inject.') {
console.log('Injected to an inactive node. Retrying...')
retryCount++
} else if (result.reason === 'Node not found. Rejecting inject') {
console.log('Injected to an unknown node. Retrying...')
retryCount++
} else if (result.reason === 'No validators found to forward the transaction') {
console.log('No validators found to forward the transaction. Retrying...')
retryCount++
Expand Down

0 comments on commit 575a8ca

Please sign in to comment.