-
Notifications
You must be signed in to change notification settings - Fork 810
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
5098 branch 5 update invalid auth params #7406
5098 branch 5 update invalid auth params #7406
Conversation
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…ion, apply spotless Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…ion, apply spotless Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…-branch-2-update-invalid-accounts-params
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…' into 5098-branch-3-update-invalid-address-hash-params
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…-branch-2-update-invalid-accounts-params
…' into 5098-branch-3-update-invalid-address-hash-params
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…-branch-2-update-invalid-accounts-params
…' into 5098-branch-3-update-invalid-address-hash-params
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…ounts-params' into 5098-branch-2-update-invalid-accounts-params
…' into 5098-branch-3-update-invalid-address-hash-params
…rams' into 5098-branch-4-update-invalid-address-params
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…' into 5098-branch-3-update-invalid-address-hash-params
…rams' into 5098-branch-4-update-invalid-address-params
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…rams' into 5098-branch-4-update-invalid-address-params
… into 5098-branch-5-update-invalid-auth-params
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
…dJsonRpcParameters Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
… into 5098-branch-5-update-invalid-auth-params
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
… into 5098-branch-5-update-invalid-auth-params
Signed-off-by: Matilda-Clerke <matilda.clerke@consensys.net>
auth = requestContext.getRequiredParameter(1, Boolean.class); | ||
} catch (Exception e) { // TODO:replace with JsonRpcParameter.JsonRpcParameterException | ||
throw new InvalidJsonRpcParameters( | ||
"Invalid auth parameter (index 1)", RpcErrorType.INVALID_AUTH_PARAMS, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is the relevant RPC - https://besu.hyperledger.org/private-networks/reference/api#clique_propose
The second param is
proposal: boolean - true to propose adding signer or false to propose removing signer
Invalid auth seems unrelated at first glance. Will it used for anything else apart from this RPC?
Maybe "Invalid proposal" instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Admittedly, I named the enumeration after the variable name storing the parameter. This makes much more sense. Thanks for the link too, I didn't realise these RPC calls were documented in an API.
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 5098: Add RpcErrorTypes Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Modify InvalidJsonRpcParameters and InvalidJsonRpcRequestException, apply spotless Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Modify InvalidJsonRpcParameters and InvalidJsonRpcRequestException, apply spotless Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Add JsonRpcParameterException for later use Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Update locations for RpcErrorType.INVALID_ACCOUNTS_PARAMS Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Address review comments, apply spotless Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Update with changes from branch 1 Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Update code to use RpcErrorType.INVALID_ADDRESS_HASH_PARAMS Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: apply spotless Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: apply spotless Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Update plugin-api gradle hash Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Add comment on INVALID_PARAMS_ERROR_CODE Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Apply spotless on latest changes Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Update code to use RpcErrorType.INVALID_ADDRESS_PARAMS Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Fix broken unit test Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Fix broken unit test Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Update with usage of RpcErrorType.INVALID_AUTH_PARAMS Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Add index to exception messages Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: apoply spotless Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Update BaseJsonRpcProcessor to utilise RpcErrorType from InvalidJsonRpcParameters Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Include parameter index in INVALID_AUTH_PARAMS Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> * 5098: Rename INVALID_AUTH_PARAMS to INVALID_PROPOSAL_PARAMS Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> --------- Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net> Signed-off-by: Matilda-Clerke <matilda.clerke@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: gconnect <agatevureglory@gmail.com>
PR description
Update code with usage of RpcErrorType.INVALID_AUTH_PARAMS
Fixed Issue(s)
#5098