You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the request body contains invalid data (method name for example), for some reason Filecoin node return HTTP 500 code together with JSON containing all info about the error, while many other protocols return HTTP 200 in this case (with similar error JSON).
Normally HTTP 500 means server-error, supposing the client will retry the same request later. So it doesn't look like a proper code for this case.
Version (run lotus --version):
Filecoin.NetVersion returns 19
Filecoin.EthProtocolVersion returns 0x13
sorry, don't have access to the client itself
Artefacts
The response body for the request from the example:
{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"wrong param count (method 'Filecoin.WalletBalance'): 0 != 1"}}
The text was updated successfully, but these errors were encountered:
Describe the bug
When the request body contains invalid data (method name for example), for some reason Filecoin node return HTTP 500 code together with JSON containing all info about the error, while many other protocols return HTTP 200 in this case (with similar error JSON).
Normally HTTP 500 means server-error, supposing the client will retry the same request later. So it doesn't look like a proper code for this case.
To Reproduce
Steps to reproduce:
curl --location --request POST 'https://hyperspace.filfox.info/rpc/v0'
--header 'Content-Type: application/json'
--data-raw '{
"jsonrpc": "2.0",
"id": 1,
"method": "Filecoin.WalletBalance",
"params": []
}
'
Fact result:
The HTTP code is 500
Expected behavior:
HTTP code should be 200
Version (run lotus --version):
Filecoin.NetVersion returns 19
Filecoin.EthProtocolVersion returns 0x13
sorry, don't have access to the client itself
Artefacts
The response body for the request from the example:
{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"wrong param count (method 'Filecoin.WalletBalance'): 0 != 1"}}
The text was updated successfully, but these errors were encountered: