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

refactor: reword error msg for reporting transactions failing for requiring full-access keys #4794

Merged
merged 5 commits into from
Sep 7, 2021

Conversation

miraclx
Copy link
Contributor

@miraclx miraclx commented Sep 6, 2021

Resolves #4746, hopes to be clearer with the error message when using a non-full-access key for a transaction that either has multiple actions or is not a function-call action.

Before:

"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key

After:

Invalid access key type. Full-access keys are required for transactions that have multiple or non-function-call actions

Would've been nice if we could resolve this issue with a message like Cannot send money without a full access key but that would require the error variant to encode a cause. But we can at least ease understanding what went wrong with a better error message that properly describes why this variant would be returned.

@frol
Copy link
Collaborator

frol commented Sep 7, 2021

@bowenwang1996 I feel that #4709 did not land to 1.21.x and now we have a discrepancy in the backward compatibility tests.

@near-bulldozer near-bulldozer bot merged commit 6c80233 into master Sep 7, 2021
@near-bulldozer near-bulldozer bot deleted the update-!fullaccess-msg branch September 7, 2021 23:47
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.

Misleading error when not full access key is used
3 participants