Skip to content

fix: downgrade Logger.error to Logger.warning for known path-not-found failures in MediaImport - #201

Open
mvanhorn wants to merge 1 commit into
getmydia:masterfrom
mvanhorn:fix/189-media-import-log-level
Open

fix: downgrade Logger.error to Logger.warning for known path-not-found failures in MediaImport#201
mvanhorn wants to merge 1 commit into
getmydia:masterfrom
mvanhorn:fix/189-media-import-log-level

Conversation

@mvanhorn

Copy link
Copy Markdown

Summary

  • Downgrade Logger.error to Logger.warning on four call sites in MediaImport that handle known operational path-failure conditions: empty file list from client, empty save_path result, save_path fallback failure, and the :path_not_found/:path_not_accessible branches inside list_files_in_path/1.
  • Add operational: true structured metadata key to each warning so operators can filter them in log aggregators and distinguish them from genuine code failures.
  • Leave Logger.error in place on actual code defects: failed client info lookup and unhandled import exceptions.

Why this matters

Closes #189. Live instances report ~3,800 :path_not_found telemetry events in a 14-day window. The root cause is the classic self-hosted volume-mount mismatch — the torrent client reports a path like /downloads/complete/<release> that does not exist inside Mydia's container filesystem view. The retry loop (up to 3 attempts) multiplies each underlying failure into several telemetry reports. These are expected operational misconfiguration events, not code defects, and Logger.error is the wrong level for them. Downgrading to Logger.warning keeps the information visible in logs while stopping these known conditions from reaching crash telemetry.

Fixes #189

…d failures

Path-not-found and path-not-accessible errors in MediaImport are expected
operational conditions (container mount mismatches), not code defects. Using
Logger.error for them inflates crash telemetry with ~3800 false reports per
14 days. Downgrade to Logger.warning and add operational: true metadata so
operators can distinguish them from genuine failures in log aggregators.

Fixes getmydia#189

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this PR is still relevant, please comment or remove the stale label.

@github-actions github-actions Bot added the stale label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MediaImport: download path-mapping mismatch floods crash telemetry (:path_not_found)

1 participant