Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

"GetTransaction" return incorrect error code when transaction is not found #111

Open
bogdan opened this issue Jan 3, 2020 · 0 comments
Open

Comments

@bogdan
Copy link
Contributor

bogdan commented Jan 3, 2020

Zilliqa blockchain returns Txn hash not Present when GetTransaction is called with unknown hash:

curl -d '{
    "id": "1",
    "jsonrpc": "2.0",
    "method": "GetTransaction",
    "params": ["655107c300e86ee6e819af1cbfce097db1510e8cd971d99f32ce2772dcad42f2"]
}' -H "Content-Type: application/json" -X POST "https://api.zilliqa.com/"
{"error":{"code":-20,"data":null,"message":"Txn Hash not Present"},"id":"1","jsonrpc":"2.0"}%

While kaya returns Error: INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised: Size not appropriate

This type of response is returned by zilliqa node only when hash size is incorrect:

curl -d '{
    "id": "1",
    "jsonrpc": "2.0",
    "method": "GetTransaction",
    "params": ["aadfa"]
}' -H "Content-Type: application/json" -X POST "https://api.zilliqa.com/"
{"error":{"code":-32602,"data":null,"message":"INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised: Size not appropriate"},"id":"1","jsonrpc":"2.0"}%
micovi added a commit to micovi/kaya that referenced this issue Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant