Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more proxy server JSON-RPC error statistic #76

Open
mario4tier opened this issue Aug 31, 2023 · 1 comment
Open

Add more proxy server JSON-RPC error statistic #76

mario4tier opened this issue Aug 31, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request low priority

Comments

@mario4tier
Copy link
Member

mario4tier commented Aug 31, 2023

Goal is to help the user distinguish if RPCs are failing because:

  • bad request (user need to fix it for succeeding)
  • the network (retry later when network is OK)

As of right now, the proxy does not reflect JSON-RPC level errors in its statistics (but it is still seen transparently as an error to the proxy caller of course).

The proxy interpret and act only on errors at lower protocol layers (IP, HTTP), but not at "JSON-RPC" level.

The enhancement is to interpret the JSON-RPC to update the statistic and better reflect the "end result".

Related info: MystenLabs/sui#12989

@mario4tier mario4tier added the enhancement New feature or request label Aug 31, 2023
@mario4tier mario4tier self-assigned this Aug 31, 2023
@mario4tier
Copy link
Member Author

More related info:
MystenLabs/sui#13695

From v1.10 release notes:
"You can now convert the sui_sdk::error::Error::RpcError response into a sui_sdk::error::JsonRpcError response to determine whether the error is a client or transient error. After converting, you can inspect the code, message, and data of the error, and use the methods is_call_error, is_client_error, is_execution_error, and is_transient_error. You can find an example of this usage at sui-sdk/examples/json_rpc_errors.rs. Note that transient errors now map to code -32050, and -32001 is reserved for any unknown errors the RPC returns."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant