Skip to content

mdblist exclusions fail open: API errors silently disable protection #288

Description

@rfsbraz

Description

_fetch_list_items in app/modules/mdblist.py catches every exception, logs it, and returns whatever partial list it had (often []). The caller treats that as the full exclusion set, so items the user explicitly protected via an mdblist list become deletable the moment mdblist.com has a bad day.

This is exactly the failure mode that was fixed for Trakt (which now raises TraktError so the library is skipped instead of unprotected) - mdblist still has the old fail-open behavior.

Failure Scenario

mdblist.com returns a 500, rate-limits, or times out mid-pagination. Deleterr logs a single error line, proceeds with an empty/partial exclusion set, and deletes items that were on the user's protection list. Irreversible, and the log line is easy to miss.

Proposed Fix

  • Raise a typed error (e.g. MdblistError) on fetch failure, mirroring the TraktError pattern
  • Handle it in the per-library processing so the affected library is skipped for the run (fail safe) and counted as failed
  • Never return a partial page set as if it were complete
  • Regression test: fetch failure => library skipped, zero deletions

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexclusionsExclusion and filtering rules

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions