Skip to content

error: RpcError with custom client error#694

Merged
jsdw merged 4 commits intomasterfrom
lexnv/692_box_rpc_err
Oct 20, 2022
Merged

error: RpcError with custom client error#694
jsdw merged 4 commits intomasterfrom
lexnv/692_box_rpc_err

Conversation

@lexnv
Copy link
Copy Markdown
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>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
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
Copy Markdown
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
Copy Markdown
Contributor

@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