Skip to content

Commit

Permalink
ValueError: {'code': -32000, 'message': 'header not found'} (#201)
Browse files Browse the repository at this point in the history
- Whitelist header not found as retryable RPC error
- See discussion MetaMask/metamask-extension#7234
  • Loading branch information
miohtama committed Feb 2, 2024
1 parent 0112918 commit 3ad8944
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Current
# 0.25.1

- Have a safe redemption time lock on Enzyme vault deployments
- Add: `VaultPolicyConfiguration.shares_action_timelock` Have a safe redemption time lock on Enzyme vault deployments
- Add: [header not found](https://github.com/tradingstrategy-ai/web3-ethereum-defi/pull/201) in retryable exceptions

# 0.25

Expand Down
11 changes: 10 additions & 1 deletion eth_defi/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,16 @@
#:
#: See :py:data:`DEFAULT_RETRYABLE_RPC_ERROR_CODES`.
#:
DEFAULT_RETRYABLE_RPC_ERROR_MESSAGES = {"nonce too low"}
DEFAULT_RETRYABLE_RPC_ERROR_MESSAGES = {

# When broadcasting batch transactions, the RPC provider
# has a load balancer that is not internally coherent
"nonce too low",

# Some random load balancer error?
# https://github.com/MetaMask/metamask-extension/issues/7234
"header not found"
}

#: Ethereum JSON-RPC calls where the value never changes
#:
Expand Down

0 comments on commit 3ad8944

Please sign in to comment.