harness(openai): surface the full transport error source chain#50
Conversation
A reqwest send failure renders only its outermost context in Display (e.g.
"error sending request for url (...)"), while the actionable cause — a
"connection refused (os error 111)" errno, a TLS failure, a DNS error — lives
one or more links down the source() chain. send_checked stringified just {e},
so a host classifying on the TinyAgentsError::Model message (loopback-offline
detection, transport retryability) could not see it.
Add error_source_chain(err) which walks the full source() chain joined by ": ",
and use it when mapping the send failure. Unit-tested; fmt + clippy clean.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Comment |
Summary
send_checkedmapped a reqwest send failure with a plain{e}, which renders only the outermost context (error sending request for url (...)). The actionable cause —connection refused (os error 111), a TLS failure, a DNS error — lives one or more links down thesource()chain and was dropped.Add
error_source_chain(err)which walks the fullsource()chain joined by": ", and use it when mapping the transport failure. This lets a downstream host classify on theTinyAgentsError::Modelmessage (loopback-offline detection, transport retryability) — parity with what a host that kept the rawreqwest::Errorchain could do.Commands run
cargo fmt --checkcargo test --lib openai::— 62 passcargo clippy --lib -- -D warnings— cleanBehavior
Additive; the only change to existing output is a richer transport-error message (now includes the cause chain).