diegosouzapw/OmniRoute · error · ObsidianTimeoutError

Obsidian API request timed out after 30s

Error message

Obsidian API request timed out after 30s

What it means

Error "Obsidian API request timed out after 30s" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/obsidian/api.ts:103

        if (error instanceof ObsidianServerError && retryCount < MAX_RETRIES - 1) {
          lastError = error;
          await sleep(Math.pow(2, retryCount) * 200);
          return attempt(retryCount + 1);
        }

        throw error;
      }

      const ct = response.headers.get("content-type") ?? "";
      if (ct.includes("application/json")) {
        return response.json();
      }
      return response.text();
    } catch (err) {
      if (err instanceof Error && err.name === "AbortError") {
        clearTimeout(timeout);
        throw new ObsidianTimeoutError("Obsidian API request timed out after 30s");
      }
      if (err instanceof ObsidianAuthError || err instanceof ObsidianNotFoundError) {
        clearTimeout(timeout);
        throw err;
      }
      if (err instanceof TypeError && err.message === "fetch failed") {
        clearTimeout(timeout);
        throw new ObsidianServerError(
          `Cannot reach Obsidian at ${baseUrl}. Ensure the Local REST API plugin is running ` +
          `and using the correct port. The REST API uses HTTP on port 27123 — do not use ` +
          `port 27124 (that is a separate MCP endpoint with HTTPS). If connecting via ` +
          `Tailscale, use http://<tailscale-ip>:27123.`
        );
      }
      if (retryCount < MAX_RETRIES - 1) {
        lastError = err instanceof Error ? err : new ObsidianServerError(String(err));
        await sleep(Math.pow(2, retryCount) * 200);
        return attempt(retryCount + 1);

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/obsidian/api.ts:103 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/12d4617cf62a71ef. Report an issue: GitHub.