Skip to content

fix: error code for Invalid params rpc error#261

Merged
fmoletta merged 1 commit into
mainfrom
fix-invalid-params-error-code
Aug 16, 2024
Merged

fix: error code for Invalid params rpc error#261
fmoletta merged 1 commit into
mainfrom
fix-invalid-params-error-code

Conversation

@fmoletta

Copy link
Copy Markdown
Contributor

Motivation

We are getting errors when running hive tests due to differences in the error codes, ie:

INFO[08-15|11:46:28] API: test started                        suite=0 test=2 name="eth_getStorageAt/get-storage-invalid-key-too-large (ethereumrust)"
[c30b50f9] >>  {"jsonrpc":"2.0","id":1,"method":"eth_getStorageAt","params":["0xaa00000000000000000000000000000000000000","0x00000000000000000000000000000000000000000000000000000000000000000","latest"]}
[c30b50f9] <<  {"id":1,"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params"}}
[c30b50f9] note: error messages removed from comparison
[c30b50f9] response differs from expected (-- client, ++ test):
[c30b50f9]  {
[c30b50f9]    "error": {
[c30b50f9] -    "code": -32602
[c30b50f9] +    "code": -32000
[c30b50f9]    },
[c30b50f9]    "id": 1,
[c30b50f9]    "jsonrpc": "2.0"
[c30b50f9]  }

Description

  • Change the error code for RpcErr::BadParams to match the one expected by the hive testing suite

Closes None, but fixes hive tests that result in invalid params

@fmoletta fmoletta changed the title fix: error code for Invalid Params error fix: error code for Invalid params rpc error Aug 15, 2024
@fmoletta fmoletta marked this pull request as ready for review August 15, 2024 15:07
@fmoletta fmoletta requested a review from a team as a code owner August 15, 2024 15:07
@fmoletta fmoletta added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit 3fa2424 Aug 16, 2024
@fmoletta fmoletta deleted the fix-invalid-params-error-code branch August 16, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants