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 RuntimeError after 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 receiver error, 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-tokens
    

    This second form contains no 429 token, so we also match the rate limited by server wording. See the resets_in note 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).

Parameters

e (Exception) –

Return type

bool