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

error: RpcError with custom client error #694

Merged
merged 4 commits into from
Oct 20, 2022
Merged

Conversation

lexnv
Copy link
Collaborator

@lexnv lexnv commented Oct 19, 2022

This PR extends the RpcError error to support two variants:

  • custom error originated from the RPC client (this is boxed to allow users to cast the error, without needlessly having the error generic)
  • custom string originated from subxt (ie, parsing parameters).

Closes #692.

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
subxt/src/error.rs Outdated Show resolved Hide resolved
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
subxt/src/rpc/rpc_client_t.rs Outdated Show resolved Hide resolved
Co-authored-by: James Wilson <james@jsdw.me>
@jsdw jsdw mentioned this pull request Oct 19, 2022
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

Great stuff!

Copy link
Member

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

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

yepp, this will be useful 👍

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.

Make RpcError generic
3 participants