Skip to content

fix(exclusions): fail safe when JustWatch or Trakt are unavailable - #283

Open
rfsbraz wants to merge 2 commits into
mainfrom
fix/exclusion-services-fail-safe
Open

fix(exclusions): fail safe when JustWatch or Trakt are unavailable#283
rfsbraz wants to merge 2 commits into
mainfrom
fix/exclusion-services-fail-safe

Conversation

@rfsbraz

@rfsbraz rfsbraz commented Jun 12, 2026

Copy link
Copy Markdown
Owner
  • JustWatch API failures (timeout, rate limit, network errors) were swallowed into empty search results, so available_on exclusions silently stopped firing during outages and items the user wanted protected proceeded toward deletion. _search now raises JustWatchError so callers can tell a service failure apart from a genuine not-found, and check_excluded_justwatch fails safe by skipping the item for that run with a warning.
  • Trakt list fetch failures were caught and returned as an empty list, silently disabling configured Trakt exclusion lists. _fetch_list_items now raises TraktError, and the per-library processing in deleterr catches it, logs prominently, and skips the library entirely (no deletions) for that run.
  • Added unit tests covering both fail-safe paths: JustWatch errors exclude the item and log a warning, and a Trakt outage marks the library as failed without deleting anything.

@github-actions

Copy link
Copy Markdown
Contributor

🐳 To test this PR, build and run directly from the branch:

Using docker compose:

services:
  deleterr:
    build: https://github.com/rfsbraz/deleterr.git#refs/pull/283/head
    volumes:
      - ./config:/config
    environment:
      LOG_LEVEL: DEBUG

Using docker build:

docker build https://github.com/rfsbraz/deleterr.git#refs/pull/283/head -t deleterr:pr-283
docker run --rm -v ./config:/config -e LOG_LEVEL=DEBUG deleterr:pr-283

@sonarqubecloud

sonarqubecloud Bot commented Jul 5, 2026

Copy link
Copy Markdown

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.

1 participant