Skip to content

[Feature Request] Graceful handling of failed external resources — skip unavailable subscriptions instead of failing entire import #350

@julxxy

Description

@julxxy

Problem

When a configuration file references multiple external subscription URLs
(e.g., in [Proxy Group] or managed config), Surfboard currently treats
the entire import as failed if any single URL returns a non-200 response
(e.g., 403, 404, or timeout).

Real-world scenario

Some airport providers design their subscription endpoints to be
single-use only — the link returns a valid response on the first request,
but returns 403 on subsequent requests (by design, as an anti-leeching measure).

With 10 subscription URLs in a config, if just 1 of them returns 403,
Surfboard marks the other 9 (which are perfectly valid) as unavailable
and the entire config import fails.

Expected Behavior

Surfboard should adopt a best-effort / fault-tolerant strategy:

  • Fetch all external resources concurrently
  • Skip any URL that returns a non-2xx response or times out
  • Import the config using only the successfully fetched resources
  • Optionally: show a warning indicating which URLs were skipped and why

This is similar to how Promise.allSettled() works vs Promise.all()
partial failure should not block the whole operation.

Current Behavior

Any single failed URL causes the entire config import to fail with no
partial recovery.

Impact

  • Users with configs referencing 10+ airport subscriptions are completely
    blocked from importing if even one provider uses a restrictive API design
  • There is no way to work around this on the user side without manually
    removing the failing URL from the config before importing

Suggested Fix

When fetching external resources during config import or update:

  1. Use parallel fetching with individual error isolation
  2. Filter out failed responses (non-2xx / timeout)
  3. Proceed with available resources
  4. Surface a non-blocking warning to the user about skipped URLs

Related: #300 (subscription timeout logic)

Environment

  • Surfboard version: latest
  • Platform: Android

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions