Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: XAMPPRocky/octocrab
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 964486fd2ef09d1aa808e287ac2fe3c7a4339f9a
Choose a base ref
..
head repository: XAMPPRocky/octocrab
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4a1054a073a2c9062cce183472191976dda3b715
Choose a head ref
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/lib.rs
10 changes: 7 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -903,7 +903,11 @@ impl Octocrab {
skip(self, request_builder, attempt),
fields(err, url=field::Empty, service.name=field::Empty, http.method=field::Empty, http.url=field::Empty, http.status_code=field::Empty, http.resend_count=field::Empty)
)]
async fn send_call(&self, request_builder: reqwest::RequestBuilder, attempt: u32) -> Result<reqwest::Response, reqwest::Error> {
async fn send_call(
&self,
request_builder: reqwest::RequestBuilder,
attempt: u32,
) -> Result<reqwest::Response, reqwest::Error> {
let span = tracing::Span::current();
let service = self.base_url.host_str().unwrap_or(GITHUB_SERVICE);
span.record("service.name", service);
@@ -917,11 +921,11 @@ impl Octocrab {
match &result {
Ok(v) => {
span.record("http.status_code", v.status().as_u16());
},
}
Err(e) => {
let status = e.status().and_then(|s| Some(s.as_u16()));
span.record("http.status_code", status);
},
}
};
result
}