is_hypersync_rate_limit_error
Documentation for eth_defi.hypersync.hypersync_timestamp.is_hypersync_rate_limit_error function.
- is_hypersync_rate_limit_error(e)
Check if a Hypersync RuntimeError is a rate limit error.
The Rust client raises
RuntimeErrorafter exhausting its internal retries. The rate limit can surface in two different textual forms depending on where in the client it is detected:As an HTTP status, e.g.
... 429 Too Many Requests ....As a server-side budget message wrapped inside a stream
inner receivererror, e.g.:inner receiver Caused by: 0: get initial data 1: rate limited by server (remaining=0/100 reqs, resets_in=15s). To increase your rate limits, upgrade your plan at https://envio.dev/app/api-tokensThis second form contains no
429token, so we also match therate limited by serverwording. See theresets_innote in the retry callers: we deliberately do not parse it and instead rely on the caller’s fixed backoff (typically longer than the reset window).