Skip to content

Isolate provider search failures instead of failing the whole request - #329

Open
lawrencejames24 wants to merge 1 commit into
Snd-R:masterfrom
lawrencejames24:fix/search-provider-failure-isolation
Open

Isolate provider search failures instead of failing the whole request#329
lawrencejames24 wants to merge 1 commit into
Snd-R:masterfrom
lawrencejames24:fix/search-provider-failure-isolation

Conversation

@lawrencejames24

Copy link
Copy Markdown

Summary

  • MetadataService.searchSeriesMetadata launched each provider's search concurrently but awaited them without catching per-provider errors, so one failing provider (e.g. a 403 from a scraping-blocked source) would throw and discard results from every other provider that had already succeeded — surfacing as a 500 to callers even though most providers returned fine.
  • Each provider's result is now caught individually and logged on failure, contributing only its own results to the aggregate instead of aborting the whole search.

Fixes #216 (at least for the manual/plain search path; the job-based auto-match flow has its own separate error handling in the same file that could use a similar treatment if useful).

Test plan

  • ./gradlew :komf-mediaserver:compileKotlinJvm builds clean
  • Reproduced the original failure mode locally: one provider (BookWalker) returning 403 while others (Viz, AniList, YenPress, MangaUpdates) returned 200 caused the whole search to fail before this change

searchSeriesMetadata launched each provider's search concurrently but
then awaited them sequentially without catching per-provider errors,
so a single failing provider (e.g. one returning 403) would throw and
discard results from every other provider that had already succeeded,
surfacing as a 500 to callers even though most providers were fine.

Now each provider's result is caught individually and logged on
failure, contributing only its own results to the aggregate instead of
aborting the whole search.

Fixes Snd-R#216
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.

Failed identification when a single source fails

1 participant