diegosouzapw/OmniRoute · error · Error
Subscription fetch failed: HTTP ${res.status}
Error message
Subscription fetch failed: HTTP ${res.status} What it means
Error "Subscription fetch failed: HTTP ${res.status}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/proxySubscription/subscriptionService.ts:349
try {
const res = await fetch(url, { redirect: "manual", signal: controller.signal, headers });
if (res.status >= 300 && res.status < 400) {
const loc = res.headers.get("location");
if (!loc) throw new Error("Subscription fetch redirected without Location");
// Resolve relative redirects and re-validate the target (SSRF guard).
const next = new URL(loc, url).toString();
await assertSafeFetchTarget(next);
const res2 = await fetch(next, { redirect: "manual", signal: controller.signal, headers });
if (res2.status >= 300 && res2.status < 400) {
throw new Error("Subscription fetch: too many redirects");
}
if (!res2.ok) {
throw new Error(`Subscription fetch failed: HTTP ${res2.status}`);
}
return await res2.text();
}
if (!res.ok) {
throw new Error(`Subscription fetch failed: HTTP ${res.status}`);
}
return await res.text();
} finally {
clearTimeout(timeout);
}
}
/**
* Classify a fetch error as retryable. Transient (retry): network/timeout/DNS
* failures, HTTP 5xx, and HTTP 429. Permanent (no retry): 4xx client errors
* (except 429) and any SSRF-guard block — those will never succeed on retry.
*/
function isSubscriptionFetchRetryable(e: unknown): boolean {
const msg = e instanceof Error ? e.message : String(e);
if (msg.includes("not allowed") || msg.includes("blocked (internal)")) return false;
const m = msg.match(/HTTP (\d{3})/);
if (m) {
const code = Number(m[1]);View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/proxySubscription/subscriptionService.ts:349 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/15f8ba5a2f8ea9c0.
Report an issue: GitHub.