diegosouzapw/OmniRoute · error

Unsupported HTTP method

Error message

Unsupported HTTP method: ${method}

What it means

Method allow-list guard in http_request: after uppercasing, the requested HTTP method is not in ALLOWED_HTTP_METHODS (the safe subset this skill permits — typically GET/POST/PUT/DELETE/PATCH/HEAD/OPTIONS). Odd or dangerous verbs (TRACE, CONNECT, custom strings) are rejected before headers/body are processed.

Solutions

  1. Use one of the allowed standard HTTP methods
  2. Check for typos or casing issues in the method field (it is uppercased, so case is not the problem)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/skills/builtins.ts:280 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/a14e95e8eb18ffe6. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/skills/builtins.ts:280

      headers: rawHeaders,
      body,
      timeoutMs,
      maxBytes,
    } = input as {
      url: string;
      method?: string;
      headers?: Record<string, unknown>;
      body?: unknown;
      timeoutMs?: number;
      maxBytes?: number;
    };
    if (!url || typeof url !== "string") {
      throw new Error("Missing required field: url");
    }

    const normalizedMethod = method.toUpperCase();
    if (!ALLOWED_HTTP_METHODS.has(normalizedMethod)) {
      throw new Error(`Unsupported HTTP method: ${method}`);
    }

    const headers = sanitizeHeaders(rawHeaders);
    const response = await safeOutboundFetch(url, {
      method: normalizedMethod,
      headers,
      body:
        normalizedMethod === "GET" || normalizedMethod === "HEAD"
          ? undefined
          : normalizeBody(body, headers),
      timeoutMs: normalizePositiveInteger(timeoutMs, 10_000, 60_000),
      allowRedirect: false,
      retry: false,
      guard: "public-only",
    });
    const limit = normalizePositiveInteger(
      maxBytes,
      MAX_HTTP_RESPONSE_BYTES,

View on GitHub (pinned to a179ffed5b)