From 5b4e8884ba446088853f73cb03ad7ffa25b72658 Mon Sep 17 00:00:00 2001 From: Vadim Filin Date: Wed, 28 Jan 2026 18:06:14 +0700 Subject: [PATCH] Handle 429 error (#782) --- foundation/src/main/resources/public | 2 +- .../upstream/ethereum/EthereumLowerBoundProofDetector.kt | 1 + .../emeraldpay/dshackle/upstream/rpcclient/JsonRpcHttpReader.kt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/foundation/src/main/resources/public b/foundation/src/main/resources/public index b381391a..78bdaca7 160000 --- a/foundation/src/main/resources/public +++ b/foundation/src/main/resources/public @@ -1 +1 @@ -Subproject commit b381391a23f75edc1c86dddf3a9aa91cc7a852e1 +Subproject commit 78bdaca754a2fda851f3bffe8a7e5ae83ffe3985 diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumLowerBoundProofDetector.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumLowerBoundProofDetector.kt index 6a0a3db6..20404b7a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumLowerBoundProofDetector.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumLowerBoundProofDetector.kt @@ -29,6 +29,7 @@ class EthereumLowerBoundProofDetector( "no historical RPC is available", "Method not found", // Monad error bc they don't have eth_getProofs "invalid block height", // hyperliquid + "not supported", ) } diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/rpcclient/JsonRpcHttpReader.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/rpcclient/JsonRpcHttpReader.kt index dce03d80..843a0be8 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/rpcclient/JsonRpcHttpReader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/rpcclient/JsonRpcHttpReader.kt @@ -107,8 +107,8 @@ class JsonRpcHttpReader( resp.map { when (it) { is AggregateResponse -> { - val parsed = parser.parse(it.response) val statusCode = it.code + val parsed = parser.parse(it.response) if (statusCode != 200) { if (parsed.hasError() && parsed.error!!.code != RpcResponseError.CODE_UPSTREAM_INVALID_RESPONSE) { // extracted the error details from the HTTP Body