Skip to content

Commit

Permalink
feat: web3.js RPC errors now hold the error code and data on the …
Browse files Browse the repository at this point in the history
…error object (#26318)

feat: web3.js RPC errors now hold the error code on the error object
  • Loading branch information
steveluscher authored Jun 30, 2022
1 parent 54cd31e commit e17ed6b
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 99 deletions.
1 change: 1 addition & 0 deletions client/src/rpc_custom_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use {
thiserror::Error,
};

// Keep in sync with web3.js/src/errors.ts
pub const JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: i64 = -32001;
pub const JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: i64 = -32002;
pub const JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: i64 = -32003;
Expand Down
Loading

0 comments on commit e17ed6b

Please sign in to comment.