From 8746cc1ae605a85459063c60c0a9b19fd498580a Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 10 Jul 2023 23:38:23 -0700 Subject: [PATCH] catch the new error format for returndata limit --- web3_proxy/src/rpcs/many.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web3_proxy/src/rpcs/many.rs b/web3_proxy/src/rpcs/many.rs index 700e5733..5228b47a 100644 --- a/web3_proxy/src/rpcs/many.rs +++ b/web3_proxy/src/rpcs/many.rs @@ -931,7 +931,11 @@ impl Web3Rpcs { // this error contains "limit" but is not a rate limit error // TODO: make the expected limit configurable // TODO: parse the rate_limit_substr and only continue if it is < expected limit - if error_msg.contains("exceeding limit 2000000") { + if error_msg.contains("exceeding limit 2000000") + || error_msg.endswith( + "exceeding --rpc.returndata.limit 2000000", + ) + { // they hit our expected limit. return the error now return Err(error.into()); } else {