diegosouzapw/OmniRoute · error

TLS_CLIENT_UNAVAILABLE

TLS_CLIENT_UNAVAILABLE

Error message

Grok TLS client unavailable: ${err.message}

What it means

The Grok web executor requires a TLS-client (JA3/fingerprint-mimicking) transport to pass bot management; tlsFetchGrok threw TlsClientUnavailableError because no such client binary/bridge is installed or reachable in this environment. The executor returns a sanitized 5xx-style error naming the missing dependency.

Solutions

  1. Install/restore the TLS client dependency the grok-web executor depends on
  2. Check the error log for the underlying TlsClientUnavailableError detail
  3. Use the official xAI API provider while the TLS client is unavailable
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at open-sse/executors/grok-web.ts:963 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/998d79e9b32e520c. Report an issue: GitHub.

Appendix: source

Thrown at open-sse/executors/grok-web.ts:963

    try {
      tlsResult = await tlsFetchGrok(GROK_CHAT_API, {
        method: "POST",
        headers,
        body: JSON.stringify(grokPayload),
        timeoutMs: FETCH_TIMEOUT_MS,
        signal: combinedSignal,
        stream: true,
        streamEofSymbol: "[DONE]",
      });
    } catch (err) {
      if (err instanceof TlsClientUnavailableError) {
        log?.error?.("GROK-WEB", `TLS client unavailable: ${err.message}`);
        const errResp = new Response(
          JSON.stringify({
            error: {
              message: sanitizeErrorMessage(`Grok TLS client unavailable: ${err.message}`),
              type: "upstream_error",
              code: "TLS_CLIENT_UNAVAILABLE",
            },
          }),
          { status: 502, headers: { "Content-Type": "application/json" } }
        );
        return { response: errResp, url: GROK_CHAT_API, headers, transformedBody: grokPayload };
      }
      log?.error?.("GROK-WEB", `Fetch failed: ${err instanceof Error ? err.message : String(err)}`);
      const errResp = new Response(
        JSON.stringify({
          error: {
            message: sanitizeErrorMessage(
              `Grok connection failed: ${err instanceof Error ? err.message : String(err)}`
            ),
            type: "upstream_error",
          },
        }),
        { status: 502, headers: { "Content-Type": "application/json" } }
      );

View on GitHub (pinned to a179ffed5b)