Skip to content

Commit

Permalink
Merge pull request #3303 from jorgemmsilva/fix/subgraph-too-many-logs…
Browse files Browse the repository at this point in the history
…-msg

fix: extend 'too many logs' error message
  • Loading branch information
jorgemmsilva authored Mar 1, 2024
2 parents 88e56d3 + 847de24 commit 0f2a9da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/evm/jsonrpc/evmchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 0f2a9da

Please sign in to comment.