[PR #106] [CLOSED] Expose message on download errors #114

Closed
opened 2026-10-13 19:47:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/106
Author: @KairosOps
Created: 6/20/2026
Status: ❌ Closed

Base: main ← Head: codex/handle-download-error-message


📝 Commits (1)

  • ab95a59 fix: expose download error messages

📊 Changes

2 files changed (+28 additions, -0 deletions)

View changed files

📝 boosty_downloader/src/infrastructure/file_downloader.py (+1 -0)
➕ test/unit/file_downloader/download_errors_test.py (+27 -0)

📄 Description

Fixes #105.

The crash happens because DownloadSinglePostUseCase._safely_process_chunk() logs and wraps lower-level download failures with e.message, but the DownloadError base class never assigned the message attribute it declares. DownloadUnexpectedStatusError therefore has a useful str(e), but no e.message, so the error handler raises an AttributeError while trying to report the original download failure.

This sets self.message in DownloadError.init, which keeps the existing application-level handling intact for all current DownloadError subclasses instead of patching one call site. I added unit coverage for the base error and DownloadUnexpectedStatusError so the attribute stays in sync with the exception text.

Checked locally:

  • python -m pytest test/unit/file_downloader/download_errors_test.py
  • python -m pytest test/unit
  • python -m py_compile boosty_downloader/src/infrastructure/file_downloader.py test/unit/file_downloader/download_errors_test.py
  • python -m ruff check boosty_downloader/src/infrastructure/file_downloader.py test/unit/file_downloader/download_errors_test.py
  • git diff --check

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/106 **Author:** [@KairosOps](https://github.com/KairosOps) **Created:** 6/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/handle-download-error-message` --- ### 📝 Commits (1) - [`ab95a59`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/ab95a59a13fc441e1d4845dddb3218d185771b69) fix: expose download error messages ### 📊 Changes **2 files changed** (+28 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `boosty_downloader/src/infrastructure/file_downloader.py` (+1 -0) ➕ `test/unit/file_downloader/download_errors_test.py` (+27 -0) </details> ### 📄 Description Fixes #105. The crash happens because DownloadSinglePostUseCase._safely_process_chunk() logs and wraps lower-level download failures with e.message, but the DownloadError base class never assigned the message attribute it declares. DownloadUnexpectedStatusError therefore has a useful str(e), but no e.message, so the error handler raises an AttributeError while trying to report the original download failure. This sets self.message in DownloadError.__init__, which keeps the existing application-level handling intact for all current DownloadError subclasses instead of patching one call site. I added unit coverage for the base error and DownloadUnexpectedStatusError so the attribute stays in sync with the exception text. Checked locally: - python -m pytest test/unit/file_downloader/download_errors_test.py - python -m pytest test/unit - python -m py_compile boosty_downloader/src/infrastructure/file_downloader.py test/unit/file_downloader/download_errors_test.py - python -m ruff check boosty_downloader/src/infrastructure/file_downloader.py test/unit/file_downloader/download_errors_test.py - git diff --check --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:47:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#114
No description provided.