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

RPC Client returning incorrect error? #19019

Closed
piazzatron opened this issue Aug 2, 2021 · 1 comment · Fixed by #29490
Closed

RPC Client returning incorrect error? #19019

piazzatron opened this issue Aug 2, 2021 · 1 comment · Fixed by #29490
Labels
stale [bot only] Added to stale content; results in auto-close after a week.

Comments

@piazzatron
Copy link
Contributor

piazzatron commented Aug 2, 2021

Problem

pub const JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: i64 = -32006;

There exists an error code JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE which appears unused, at least in this file; it seems that JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE may be accidentally returned in it's place:

JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE,

            RpcCustomError::TransactionPrecompileVerificationFailure(e) => Self {
                code: ErrorCode::ServerError(
                    // Should this be the the precompile error rather than signature verification failure?
                    JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE, // Intentional?
                ),
                message: format!("Transaction precompile verification failure {:?}", e),
                data: None,
            },

Proposed Solution

Happy to open a PR correcting the error type if this indeed a bug!

@CriesofCarrots
Copy link
Contributor

Yep, that looks like a bug that's been there since that error was added 🤕
Technically that will be a breaking change, but please so open a PR and we'll decide how to roll out. Thank you!

@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Dec 27, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants