Skip to content

cli: improve RPC error detection#720

Merged
evgeniko merged 3 commits intomainfrom
cli_rpcerror_handle
Oct 24, 2025
Merged

cli: improve RPC error detection#720
evgeniko merged 3 commits intomainfrom
cli_rpcerror_handle

Conversation

@evgeniko
Copy link
Copy Markdown
Contributor

@evgeniko evgeniko commented Oct 23, 2025

at the moment rpc issues look like this:

127 |         case "NUMERIC_FAULT":
128 |         case "BUFFER_OVERRUN":
129 |             error = new RangeError(message);
130 |             break;
131 |         default:
132 |             error = new Error(message);
                          ^
error: unsupported protocol  (info={ "protocol": "" }, operation="request", code=UNSUPPORTED_OPERATION, version=6.15.0)
       info: {
  protocol: "",
},
  operation: "request",
 shortMessage: "unsupported protocol ",
       code: "UNSUPPORTED_OPERATION"

this PR tries to catch an rpc issue and change the error message to this:

RPC connection error for Seievm on Mainnet

RPC endpoint:
Error: unsupported protocol  (info={ "protocol": "" }, operation="request", code=UNSUPPORTED_OPERATION, version=6.15.0)

This error usually means the RPC endpoint is missing, invalid, or unreachable.
You can specify a private RPC endpoint by creating an overrides.json file.

Create a file named overrides.json in your project root:

{
  "chains": {
    "Seievm": {
      "rpc": "https://your-private-rpc-endpoint"
    }
  }
}

For more information about overrides.json:
  • https://wormhole.com/docs/products/token-transfers/native-token-transfers/faqs/#how-can-i-specify-a-custom-rpc-for-ntt
Screenshot 2025-10-24 at 13 40 18

dvgui
dvgui previously approved these changes Oct 23, 2025
Copy link
Copy Markdown
Contributor

@dvgui dvgui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

nvsriram
nvsriram previously approved these changes Oct 23, 2025
Copy link
Copy Markdown
Contributor

@nvsriram nvsriram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! But maybe we can add this unimplemented for the other chains (Solana) or at least a TODO so we that we can just update one function to handle all errors.

@evgeniko evgeniko dismissed stale reviews from nvsriram and dvgui via 9668d75 October 24, 2025 11:39
@evgeniko evgeniko merged commit c680b5c into main Oct 24, 2025
9 checks passed
@evgeniko evgeniko deleted the cli_rpcerror_handle branch October 24, 2025 12:54
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.

3 participants