Skip to content

Commit

Permalink
feat: web3.js RPC errors now hold the error code on the error object
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher committed Jun 29, 2022
1 parent e241906 commit 0b48f03
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 108 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 0b48f03

Please sign in to comment.