From 847de249a68696b72a965e17969588cb1fee84ed Mon Sep 17 00:00:00 2001 From: Jorge Silva Date: Fri, 1 Mar 2024 11:46:47 +0000 Subject: [PATCH] fix: extend 'too many logs' error message --- packages/evm/jsonrpc/evmchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/evm/jsonrpc/evmchain.go b/packages/evm/jsonrpc/evmchain.go index 0ea5950acb..213c8ddff2 100644 --- a/packages/evm/jsonrpc/evmchain.go +++ b/packages/evm/jsonrpc/evmchain.go @@ -528,7 +528,7 @@ func (e *EVMChain) Logs(query *ethereum.FilterQuery, params *LogsLimits) ([]*typ from := from.Uint64() to := to.Uint64() if to > from && to-from > uint64(params.MaxBlocksInLogsFilterRange) { - return nil, errors.New("too many blocks in filter range") + return nil, errors.New("ServerError(-32000) too many blocks in filter range") // ServerError(-32000) part is necessary because subgraph expects that string in the error msg: https://github.com/graphprotocol/graph-node/blob/591ad93b5144ff5e6037b73862c607effad90e7f/chain/ethereum/src/ethereum_adapter.rs#L335 } for i := from; i <= to; i++ { state, err := e.iscStateFromEVMBlockNumber(new(big.Int).SetUint64(i))