-
Notifications
You must be signed in to change notification settings - Fork 173
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: include error code in RpcLogger #1135
Conversation
@@ -154,12 +159,16 @@ async fn ws_server_logger() { | |||
let res: Result<String, Error> = client.request("unknown_method", rpc_params![]).await; | |||
assert!(res.is_err()); | |||
|
|||
let res: Result<String, Error> = client.request("err", rpc_params![]).await; |
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.
Expanded the test for failed RPC calls too
Thank you for looking into this! |
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.
looks good!
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!
Close #1129
In addition it contains a bug fix that were introduced by the
IntoResponse
trait and I forgot to check the outcome from theResponsePayload
where the user could inject there own JSON-RPC error codes etc.Thanks to @wlmyng for spotting the bug.