diegosouzapw/OmniRoute · error · Error

t("proxySubscription.deleteFailed")

Error message

t("proxySubscription.deleteFailed")

What it means

Localized delete sentinel: after an explicit window.confirm, the DELETE to /api/v1/management/proxy-subscriptions/{id} returned non-ok — the subscription was not removed. The fixed 'deleteFailed' message hides the raw status; the list is only reloaded on success, so the row remains.

Solutions

  1. Inspect the DELETE response for the server-side reason
  2. Retry after confirming the record isn't mid-refresh or locked
  3. Reload the list to check current state
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/settings/components/proxy/SubscriptionTab.tsx:226 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/271ae8a3c411d449. Report an issue: GitHub.

Appendix: source

Thrown at src/app/(dashboard)/dashboard/settings/components/proxy/SubscriptionTab.tsx:226

        method: "POST",
      });
      if (!res.ok) throw new Error(t("proxySubscription.refreshFailed"));
      await load();
    } catch (e) {
      setError(e instanceof Error ? e.message : String(e));
    } finally {
      setBusyId(null);
    }
  };

  const remove = async (sub: SubscriptionRecord) => {
    if (!window.confirm(t("proxySubscription.confirmDelete", { name: sub.name }))) return;
    setBusyId(sub.id);
    try {
      const res = await fetch(`/api/v1/management/proxy-subscriptions/${sub.id}`, {
        method: "DELETE",
      });
      if (!res.ok) throw new Error(t("proxySubscription.deleteFailed"));
      await load();
    } catch (e) {
      setError(e instanceof Error ? e.message : String(e));
    } finally {
      setBusyId(null);
    }
  };

  const statusBadge: Record<SubscriptionRecord["status"], string> = {
    ok: "bg-green-500/15 text-green-600 border-green-500/30",
    error: "bg-red-500/15 text-red-600 border-red-500/30",
    empty: "bg-yellow-500/15 text-yellow-600 border-yellow-500/30",
  };

  return (
    <div className="space-y-4">
      <div className="flex items-center justify-between">
        <p className="text-sm text-text-muted">{t("proxySubscription.description")}</p>

View on GitHub (pinned to a179ffed5b)