XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.5k stars 1.46k forks source link

[rpcWRONG_NETWORK does not have error info ] (Version: [2.0.0-b1]) #4735

Open cindyyan317 opened 11 months ago

cindyyan317 commented 11 months ago

Issue Description

rpcWRONG_NETWORK does not have error info

Steps to Reproduce

Request "tx" with ctid of wrong network id eg:

{
"method": "tx",
"params":[
        {
            "ctid": "C002806D000E0001"
        }
    ]
}

Expected Result

normal error info and error code

Actual Result

{
  "result": {
    "error": "unknown",
    "error_code": -1,
    "error_message": "Wrong network. You should submit this request to a node running on NetworkID: 1",
    "request": {
      "command": "tx",
      "ctid": "C002806D000E0001"
    },
    "status": "error"
  }
}

Environment

devnet

Supporting Files

missing rpcWRONG_NETWORK at https://github.com/XRPLF/rippled/blob/2bb8de030fc887787f311e428e2e91466e41a240/src/ripple/protocol/impl/ErrorCodes.cpp#L47

intelliot commented 11 months ago

~This might be ok. @cindyyan317 can you share an example of what the "normal error info and error code" for this error should look like?~

I see that https://github.com/XRPLF/rippled/pull/4738 is expected to fix this.