This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Better error for when origin filter prevent the call to be dispatched #10134
Merged
paritytech-processbot
merged 9 commits into
master
from
gui-better-error-on-failing-filter
Nov 2, 2021
Merged
Better error for when origin filter prevent the call to be dispatched #10134
paritytech-processbot
merged 9 commits into
master
from
gui-better-error-on-failing-filter
Nov 2, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gui1117
added
B3-apinoteworthy
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
labels
Oct 31, 2021
bkchr
approved these changes
Oct 31, 2021
bkchr
reviewed
Oct 31, 2021
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
shawntabrizi
approved these changes
Oct 31, 2021
bot merge |
Waiting for commit status. |
Merge cancelled due to error. Error: Waiting on code owner review from athei. |
athei
approved these changes
Nov 1, 2021
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
bot merge |
Waiting for commit status. |
Merge cancelled due to error. Error: Checks failed for a169ea9 |
bot merge |
Waiting for commit status. |
Merge cancelled due to error. Error: Checks failed for 6453c10 |
bot merge |
paritytech-processbot
bot
deleted the
gui-better-error-on-failing-filter
branch
November 2, 2021 14:20
grishasobol
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Mar 28, 2022
…paritytech#10134) * better error * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * remove unused * fix error * fmt * fix tests * fmt * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * fix typo Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com>
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
…paritytech#10134) * better error * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * remove unused * fix error * fmt * fix tests * fmt * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * fix typo Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #9951
Breaking change
The error returned when the filter in the origin prevent the call to be dispatched was
BadOrigin
, it is nowframe_system::Error::CallFiltered
.Description
Currently when a call fail to be dispatched because the origin filter prevents it, then the error returned is BadOrigin.
This is lots of people confused, thinking it is the origin caller which is wrong, but it is actually the origin filter. (I understand that saying that the origin is made of 2 part the caller and the filter is maybe already a bad naming from my side).
Anyhow this PR will do that we return a new variant
CallFiltered
which have a corresponding description in the metadata:We can make the message even more descriptive if wanted.
cc @gilescope