Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion crates/uv-client/src/base_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,18 @@ impl RetryableStrategy for UvRetryableStrategy {
///
/// These cases should be safe to retry with [`Retryable::Transient`].
pub fn is_extended_transient_error(err: &dyn Error) -> bool {
trace!("Considering retry of error: {err:?}");
// First, try to show a nice trace log
if let Some((Some(status), Some(url))) = find_source::<reqwest::Error>(&err)
.map(|request_err| (request_err.status(), request_err.url()))
{
let status = status
.canonical_reason()
.map(|reason| format!(" HTTP {status} {reason} "))
.unwrap_or_else(|| format!(" HTTP {status} "));
trace!("Considering retry of {status} for {url}");
} else {
trace!("Considering retry of error: {err:?}");
}

if let Some(io) = find_source::<std::io::Error>(&err) {
if io.kind() == std::io::ErrorKind::ConnectionReset
Expand Down
Loading