diegosouzapw/OmniRoute · error · Error

data?.error || translateOrFallback("tailscaleEnableFailed"…

Error message

data?.error || translateOrFallback("tailscaleEnableFailed", "Failed to enable Tailscale Funnel")

What it means

The Tailscale enable flow's initial POST to /api/tunnels/tailscale/enable (optional sudo password) returned non-OK; thrown message prefers data?.error over translateOrFallback('tailscaleEnableFailed', ...). Precedes the needsLogin and funnelNotEnabled interactive branches, which require an OK response.

Solutions

  1. Verify sudo password/privileges if required by the enable path
  2. Check server logs for the tailscale enable route
  3. Inspect needsLogin/funnelNotEnabled flags before treating it as a hard failure
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx:823 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/971781791b3e04ea. Report an issue: GitHub.

Appendix: source

Thrown at src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx:823

    const res = await fetch("/api/tunnels/tailscale/enable", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify(payload),
    });
    const data = await res.json().catch(() => ({}));
    return { res, data };
  }, []);

  const handleTailscaleEnable = useCallback(async () => {
    setTailscaleBusy(true);
    setTailscaleNotice(null);

    try {
      let { res, data } = await requestTailscaleEnable({
        sudoPassword: tailscalePassword || undefined,
      });
      if (!res.ok) {
        throw new Error(
          data?.error ||
            translateOrFallback("tailscaleEnableFailed", "Failed to enable Tailscale Funnel")
        );
      }

      if (data?.needsLogin && data?.authUrl) {
        window.open(data.authUrl, "tailscale_auth", "width=680,height=780");
        setTailscaleNotice({
          type: "info",
          message: translateOrFallback(
            "tailscaleWaitingForLogin",
            "Complete the Tailscale login in the opened browser tab. OmniRoute will retry automatically."
          ),
        });

        const loggedIn = await waitForTailscale((status) => status.loggedIn);
        if (!loggedIn) {
          throw new Error(

View on GitHub (pinned to a179ffed5b)