exception_retry_middleware

Documentation for eth_defi.middleware.exception_retry_middleware function.

exception_retry_middleware(make_request, web3, errors, retries=5, sleep=5, backoff=1.2)[source]

Creates middleware that retries failed HTTP requests. Is a default middleware for HTTPProvider.

See http_retry_request_with_sleep_middleware() for usage.

Parameters
Return type

Callable[[RPCEndpoint, Any], web3.types.RPCResponse]