Skip to content

Commit

Permalink
🔊 No need to log read_text return value
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed Nov 20, 2024
1 parent 7d3317d commit 66870dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ impl RequestBuilder {
})
}

#[instrument(skip_all, ret(level = Level::DEBUG), err(level = Level::DEBUG))]
#[instrument(skip_all, err(level = Level::DEBUG))]
pub async fn read_text(self, error_for_status: bool) -> Result<String> {
let response = self.0.send().await.context("failed to send the request")?;
let status = response.status();
trace!(url = ?response.url(), ?status, "Reading response…");
let body = response.text().await.context("failed to read the response")?;
trace!(?status, body, "Received response");
debug!(?status, body, "Received response");
if error_for_status && (status.is_client_error() || status.is_server_error()) {
Err(anyhow!("HTTP {status:?}"))
} else {
Expand Down

0 comments on commit 66870dd

Please sign in to comment.