Repository navigation
fix: Propagate download errors to callers - #270
Merged
Merged
Conversation
Owner
Author
This was referenced Aug 24, 2025
Merged
kalbasit
marked this pull request as ready for review
August 24, 2025 22:27
kalbasit
changed the base branch from
integrate_download_state
to
graphite-base/270
August 24, 2025 22:44
kalbasit
force-pushed
the
graphite-base/270
branch
from
August 24, 2025 22:46
5cc5805 to
410684a
Compare
kalbasit
force-pushed
the
recognize_error_early
branch
from
August 24, 2025 22:46
ea561ce to
21660d6
Compare
kalbasit
changed the base branch from
graphite-base/270
to
integrate_download_state
August 24, 2025 22:46
kalbasit
changed the base branch from
integrate_download_state
to
graphite-base/270
August 24, 2025 22:53
kalbasit
force-pushed
the
graphite-base/270
branch
from
August 24, 2025 22:53
410684a to
cc2d16f
Compare
kalbasit
force-pushed
the
recognize_error_early
branch
from
August 24, 2025 22:53
21660d6 to
05885c9
Compare
kalbasit
force-pushed
the
recognize_error_early
branch
from
August 24, 2025 22:53
05885c9 to
6f11c52
Compare
kalbasit
force-pushed
the
recognize_error_early
branch
from
August 24, 2025 22:59
6f11c52 to
7aba5c1
Compare
Owner
Author
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 free
to 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.

TL;DR
Properly propagate download errors from background goroutines to callers in the cache package.
What changed?
downloadErrorfield to thedownloadStatestruct to store errors that occur during downloadspullNarIntoStoreandpullNarInfofunctions to store errors in thedownloadStateGetNarandGetNarInfoto check for and return these errors to callersstorage.ErrNotFoundandupstream.ErrNotFoundHow to test?
Why make this change?
Previously, errors that occurred during background NAR downloads were logged but not properly propagated to callers. This could lead to misleading error messages and incorrect behavior. This change ensures that download errors are properly captured and returned, improving error handling and making debugging easier.