feat: add infura error code to retry detection (#1921)

This commit is contained in:
Matthias Seitz 2022-12-02 22:30:56 +01:00 committed by GitHub
parent e5aa4518d7
commit f886d379a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -354,6 +354,11 @@ impl RetryPolicy<ClientError> for HttpRateLimitRetryPolicy {
return true
}
// This is an infura error code for `exceeded project rate limit`
if *code == -32005 {
return true
}
// alternative alchemy error for specific IPs
if *code == -32016 && message.contains("rate limit") {
return true