tinyhumansai/openhuman · error

[transport:cloud] response missing result

Error message

[transport:cloud] response missing result

What it means

Cloud transport strictness check: HTTP was 2xx and the body was valid JSON with no `error` field, but it also had no own `result` property — a malformed JSON-RPC success frame. The transport refuses to coerce `undefined` into a result, so downstream `T`-typed consumers never see phantom values.

Source

Thrown at app/src/services/transport/CloudHttpTransport.ts:85

      }
      throw err;
    } finally {
      clearTimeout(timeoutId);
    }

    if (!response.ok) {
      const text = await response.text();
      throw new Error(`[transport:cloud] HTTP ${response.status}: ${text || response.statusText}`);
    }

    const json = (await response.json()) as JsonRpcResponse<T>;

    if (json.error) {
      logErr('[transport:cloud] ← %s error: %s', method, json.error.message);
      throw new Error(json.error.message ?? 'Cloud RPC returned an error');
    }
    if (!Object.prototype.hasOwnProperty.call(json, 'result')) {
      throw new Error('[transport:cloud] response missing result');
    }

    log('[transport:cloud] ← %s id=%d ok', method, id);
    return json.result as T;
  }

  async *stream<T>(
    method: string,
    params: unknown,
    opts?: { signal?: AbortSignal }
  ): AsyncIterable<T> {
    const result = await this.call<T>(method, params, opts);
    yield result;
  }

  async isHealthy(): Promise<boolean> {
    try {
      await this.call('openhuman.ping', {}, { signal: AbortSignal.timeout(5000) });

View on GitHub (pinned to a221052e0d)

Solutions

  1. Replay the request with curl and inspect the raw body — confirm it is `{jsonrpc:'2.0', id, result:...}`
  2. Verify rpcUrl points at the cloud core's JSON-RPC route, not a health or status endpoint
  3. Disable any gateway/proxy body transformation for this route
  4. Fix the server/mock to always include `result` (even `result: null`) on success
Defensive patterns

Strategy: try-catch

Try / catch

try { return await cloud.call<T>(m, p); }
catch (e) {
  if (e instanceof Error && e.message === '[transport:cloud] response missing result') {
    throw new Error(`cloud rpc url is not a JSON-RPC endpoint (method ${m}) — check the connection profile`);
  }
  throw e;
}

Prevention

When it happens

Trigger: Cloud endpoint returning an empty object `{}`, a `{jsonrpc, id}` frame with the result dropped by serialization, or an HTTP 200 HTML/text body that happens to parse as JSON (rare) — more typically a gateway rewriting the response.

Common situations: Wrong rpcUrl landing on a status/health route that answers 200 `{}`; API-gateway response transformation; server bug after a wire-shape change; mock cloud returning incomplete frames.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/90a754535ea5255d. Report an issue: GitHub.