bodhi.js icon indicating copy to clipboard operation
bodhi.js copied to clipboard

eth_subscribe method not found

Open ermalkaleci opened this issue 2 years ago • 1 comments

https://github.com/AcalaNetwork/subway/issues/119

Bodhi will return invalid params, maybe we need to make it return method not found like eth

ermalkaleci avatar Oct 19 '23 07:10 ermalkaleci

input

{
    "jsonrpc":"2.0","id": 2,
    "method": "eth_subscribe",
    "params": ["nonono"]
}

current output

{
    "id": 2,
    "jsonrpc": "2.0",
    "error": {
        "code": -32602,
        "message": "invalid argument 0: expected eventName `newHeads`, `newFinalizedHeads` or `logs`"
    }
}

expected output

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32601,
        "message": "no \"nonono\" subscription in eth namespace"
    },
    "id": 2
}

shunjizhan avatar Oct 20 '23 09:10 shunjizhan