Skip to content

fix(infra): include the error source chain in soloist download failures - #958

Merged
LargeModGames merged 1 commit into
LargeModGames:mainfrom
niukanen1:fix/soloist-download-cause-950
Oct 29, 2026
Merged

LargeModGames merged 1 commit into
LargeModGames:mainfrom
niukanen1:fix/soloist-download-cause-950

Conversation

@niukanen1

@niukanen1 niukanen1 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

A failed Soloist download only logged error decoding response body: reqwest's Display keeps the top-level text and hides error.source(), so the warning did not say whether the cause was a connection reset, the 30s read timeout, or a cut stream.

failed() in src/infra/soloist/download.rs now takes std::error::Error and walks the source chain, joining every level with ": ". The full chain reaches both the download warning and the settings status line, which interpolates the message as before. The three call sites that built the message from plain strings now construct Failure::Failed directly.

The automatic retry for body read errors suggested in the issue is left as a follow-up; this change is the diagnostic half.

Tests: two unit tests in the download module cover the chain walk with a fake two-level error (the three-level string error decoding response body: error reading a body from connection: connection reset by peer, which fails on the current to_string() conversion) and the no-source case that must not gain a trailing separator.

Part of #950

Summary by CodeRabbit

  • Bug Fixes
    • Soloist download warnings now include details from the underlying error chain, making it easier to understand why a download failed. When an error has no underlying cause, the warning continues to show its original message. Failures involving a missing state directory, a missing binary, or an archive extraction problem retain their specific messages.

The download warning only showed reqwest's top-level text like
'error decoding response body', hiding whether the cause was a
connection reset, the read timeout, or a cut stream. failed() now
walks error.source() and joins every level into the message, which
also reaches the settings status line.

Part of LargeModGames#950

Signed-off-by: niukanen1 <57656076+niukanen1@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 6e646f4 and ec2f917.

Files selected for processing: 2
  • CHANGELOG.md
  • src/infra/soloist/download.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

Soloist download warnings now include the display text of source errors. Errors without a source retain their own message. The missing state directory, missing binary, and tar failure paths now construct Failure::Failed directly.

Changes: Soloist download error reporting

Layer / File(s) Summary
Format and verify download errors
src/infra/soloist/download.rs, CHANGELOG.md
failed appends each source error’s display text, joined with : . Static failure cases construct Failure::Failed directly. Tests cover chained and source-free errors. The changelog records the warning change.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

Merge Risk: Minimal · up to ec2f9

The change adds error-source details to download failures. No merge-blocking issue was identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the conventional-commit prefix "fix" with the scope "infra", which matches the allowed prefixes. It is concise and imperative. It names the main change: download failure messages now in…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title uses the conventional-commit prefix "fix" with the scope "infra", which matches the allowed prefixes. It is concise and imperative. It names the main change: download failure messages now include the error source chain. The raw summary and PR objectives confirm that the change does exactly this in src/infra/soloist/download.rs.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
✨ Simplify code
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit 58dcffc into LargeModGames:main Oct 29, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants