Skip to content

Commit 295dc90

Browse files
committed
Catch free API access unavailable errors as retriable errors
1 parent 6fa7ae4 commit 295dc90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ethereum/networkAdapters/EvmScanAdapter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ export class EvmScanAdapter extends NetworkAdapter<EvmScanAdapterConfig> {
325325
'status' in cleanData &&
326326
cleanData.status === '0' &&
327327
typeof cleanData.result === 'string' &&
328-
cleanData.result.match(/Max calls|rate limit/) != null
328+
(cleanData.result.match(/Max calls|rate limit/) != null ||
329+
cleanData.result.match(/Free API access is temporarily unavailable/) !=
330+
null)
329331
) {
330332
throw new RateLimitError(`fetchGetEtherscan rate limit for ${server}`)
331333
}

0 commit comments

Comments
 (0)