fix: downgrade Logger.error to Logger.warning for known path-not-found failures in MediaImport - #201
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
…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>
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. |
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.
Summary
Logger.errortoLogger.warningon four call sites inMediaImportthat 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_accessiblebranches insidelist_files_in_path/1.operational: truestructured metadata key to each warning so operators can filter them in log aggregators and distinguish them from genuine code failures.Logger.errorin 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_foundtelemetry 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, andLogger.erroris the wrong level for them. Downgrading toLogger.warningkeeps the information visible in logs while stopping these known conditions from reaching crash telemetry.Fixes #189