Skip to content

JsonRPC api response type doesn't match request type #4154

Closed
@ququzone

Description

@ququzone

What did you do? If possible, provide a recipe for reproducing the error.

JsonRPC api response's id field type doesn't match the request type.

Request

curl -X POST https://babel-api.mainnet.iotex.io -H "Content-Type:application/json" --data '{
    "jsonrpc":"2.0",
                "method":"eth_getTransactionCount",
                "params":["0x002E983C3134Cf7e7b0F2A3852fb66Faa34a5062", "latest"],
    "id": "1"
}'

Response

{
 "jsonrpc":"2.0",
  "id":1, 
  "result":"0x0"
}

The id field's type should be string, not number. It's should be match the request type.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions