Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
src/client/http.rs
Outdated
|
|
||
| let res = serde_json::from_slice::<RpcResponse>(body_bytes)?; | ||
| if let Some(e) = res.error { | ||
| bail!("code: {}", e.code); |
There was a problem hiding this comment.
it'll be helpful to return the error instead and have the calling function log the error, and metrics instrument the error code
There was a problem hiding this comment.
I'm a little confused. What you're describing is exactly what's happening haha. bail! is just short for return eyre::eyre!("my error"). It's not logging anything.
There was a problem hiding this comment.
oh I meant returning the error instead of the error code!
src/client/http.rs
Outdated
|
|
||
| if let Err(e) = parse_response_code(&body_bytes) { | ||
| error!( | ||
| error = %e, |
There was a problem hiding this comment.
how does the tracing processor record the error code here?
There was a problem hiding this comment.
I'm currently not recording the response code! I'll update this to include the code!
There was a problem hiding this comment.
Just addressed this in most recent commit!
| let res = self.client.ready().await?.call(req).await?; | ||
|
|
||
| let (parts, body) = res.into_parts(); | ||
| let body_bytes = body.collect().await?.to_bytes().to_vec(); |
There was a problem hiding this comment.
have you tested this against the optimism package? does this handle gzip responses?
There was a problem hiding this comment.
Yes we've run it in the optimism kurtosis devnet and everything seems to work great!
Co-authored-by: shana <avalonche@protonmail.com>
|
@avalonche I believe all your comments have been address and should be ready for your final OK. TY! |
* fix for cloned service * cleanup process_response * eyre bail * remove unnecessary deps * Update src/client/http.rs Co-authored-by: shana <avalonche@protonmail.com> * parse response code * clippy fix --------- Co-authored-by: shana <avalonche@protonmail.com>
* fix for cloned service * cleanup process_response * eyre bail * remove unnecessary deps * Update src/client/http.rs Co-authored-by: shana <avalonche@protonmail.com> * parse response code * clippy fix --------- Co-authored-by: shana <avalonche@protonmail.com>
This PR is dependent on #135
You can use this diff to compare directly with that PR
Changes: