RPC error "method eth_createAccessList does not exist" overrides batch call

Our team makes use of batch calls to Infura and we noticed that the RPC error method eth_createAccessList does not exist makes the batch request collapse to a single RPC response (which causes a parsing error in our backend).

For example, consider the following request:

$ INFURA_PROJECT_ID='fill me'
$ REQUEST='[
  {"method":"eth_createAccessList","params":["not relevant"],"id":1,"jsonrpc":"2.0"},
  {"method":"eth_blockNumber","params":[],"id":2,"jsonrpc":"2.0"}
]'
$ curl --data "$REQUEST" -H "Content-Type: application/json" -X POST "https://mainnet.infura.io/v3/$INFURA_PROJECT_ID"
{"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"The method eth_createAccessList does not exist/is not available"}}

I would expect the error to be captured in a batch, like this:

[
  {"error":{"code":-32601,"message":"The method eth_createAccessList does not exist/is not available"},"jsonrpc":"2.0","id":1},
  {"result":"0xf357be","jsonrpc":"2.0","id":2}
]

In fact, this is how errors in RPC requests are normally handled in batch calls:

REQUEST='[
  {"method":"eth_blockNumber","params":["intentionally bad param"],"id":1,"jsonrpc":"2.0"},
  {"method":"eth_blockNumber","params":[],"id":2,"jsonrpc":"2.0"}
]'
curl --data "$REQUEST" -H "Content-Type: application/json" -X POST "https://mainnet.infura.io/v3/$INFURA_PROJECT_ID"
[{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"too many arguments, want at most 0"}},{"jsonrpc":"2.0","id":2,"result":"0xf357cd"}]

hey, I’ve reported this to our team, let’s follow up in the ticket. thanks !