Skip to content

Commit

Permalink
Fix retry logic
Browse files Browse the repository at this point in the history
  • Loading branch information
victorkirov committed Oct 28, 2024
1 parent 5f96dbf commit 82a58f6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions api/esplora/esploraAPiProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ export class BitcoinEsploraApiProvider {
retries: 1,
retryDelay: axiosRetry.exponentialDelay,
retryCondition: (error) => {
if (
error?.code === 'ECONNABORTED' ||
error?.response?.status === 429 ||
(error?.response?.status ?? 0) >= 500
) {
if (error?.response?.status === 429 || (error?.response?.status ?? 0) >= 500) {
return true;
}
return false;
Expand Down

0 comments on commit 82a58f6

Please sign in to comment.