Uh oh!
There was an error while loading. Please reload this page.
fix(backend): use full error chain in stream read failures - #1861
Merged
Conversation
The map_err closures in get() walk the error source chain into a string but then pass the original error to IOError::new instead of the chain. Fix all three backends (http, hugging_face, model_scope). Signed-off-by: pmady <pavan4devops@gmail.com>
pmady
requested review from
BraveY, EvanCley, chlins, gaius-qi, xujihui1985 and yyzai384May 31, 2026 02:13
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@## main #1861 +/- ##
==========================================
- Coverage 44.11% 44.09% -0.03%
==========================================
Files 93 93 Lines 27564 27564 ==========================================
- Hits 12161 12154 -7 - Misses 15403 15410 +7
🚀 New features to boost your workflow:
|
gaius-qi
enabled auto-merge (squash)
June 2, 2026 06:34
gaius-qi
disabled auto-merge
June 2, 2026 06:34
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
map_errclosures inget()across all three backends walk the error source chain into achainstring but then pass the originalerrtoIOError::new()instead ofchain. The full error context gets computed and thrown away.Fixes http, hugging_face, and model_scope backends.
Motivation and Context
When a stream read fails mid-download, the IOError only contains the top-level message. Nested causes (DNS, TLS, connection reset, etc.) are lost. This makes debugging download failures harder than it needs to be.