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

Expose error in NetworkController:rpcEndpointUnavailable event #5501

Draft
wants to merge 1 commit into
base: expose-messenger-events-for-rpc-failover
Choose a base branch
from

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Mar 19, 2025

Explanation

In the clients we want the ability to decide whether or not to create a Segment error when a request to Infura fails too many times in a row. Specifically, we want to be able to ignore connection errors, as they may indicate that the user is offline, in which case we don't need to fail over to Quicknode.

To accommodate this need:

  • Expose the error that was encountered while making the request in the NetworkController:rpcEndpointUnavailable event data.
  • Export isConnectionError from RpcService.

References

Progresses #5493.

Changelog

(Updated in PR.)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

In the client we want the ability to decide whether or not to create a
Segment error when a request to Infura fails too many times in a row.
Specifically, we want to be able to ignore connection errors.

To accommodate this:

- Expose the error that was encountered while making the request in the
  `NetworkController:rpcEndpointUnavailable` event data.
- Export `isConnectionError` from `RpcService`.
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.

1 participant