-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detecting rate limiting and transport error codes #565
Comments
I think ideally this kind of throttling should be handled by the transport layer itself. Obviously I'm also fine with exposing this as a typed error. I think |
In general I think exposing the error code and contents in an enum would be fine. |
Related: #585 |
I see One thing that is still missing (I think) is getting the accompanying payload message. Some servers will set the back off time or other useful information. For example, Infura returns Infura rate limit docs: https://docs.infura.io/infura/networks/ethereum/how-to/secure-a-project/set-rate-limits#how-do-i-know-if-im-being-rate-limited |
I am currently using
eth_getLogs
and will occasionally get rate limited. This would be indicated by an error code429
.Judging by this code, this currently gets "exposed" as an error string
Would it be possible to expose the plain code? This would make it far easier to match on.
--edit--
In addition, Infura adds additional information into the body, which would be useful to have. i.e. the number of seconds to backoff.
The text was updated successfully, but these errors were encountered: