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

fix: Catch errors decoding opaque calls #347

Merged
merged 5 commits into from
Nov 24, 2020
Merged

fix: Catch errors decoding opaque calls #347

merged 5 commits into from
Nov 24, 2020

Conversation

emostov
Copy link
Contributor

@emostov emostov commented Nov 18, 2020

Currently we decode OpaqueCalls in order to give more meaningful responses.

Recently, we ran into a scenario where the OpaqueCall argument simply appears to be invalid (see #343, polkadot-js/api#2858). In this case the decoding will always fail.

In the current release the whole endpoint will fail when the OpaqueCall is bad. This PR introduces a catch for the throw, and will now respond with the raw, hex encoded scale when the decoding fails.

emostov and others added 2 commits November 20, 2020 16:00
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
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.

LGTM

@emostov emostov merged commit d128e54 into master Nov 24, 2020
@emostov emostov deleted the zeke-try-opaque branch November 24, 2020 17:09
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