JuliusBrussee/caveman · error · Error

bounded_response_unavailable

Error message

bounded_response_unavailable

What it means

Error "bounded_response_unavailable" thrown in JuliusBrussee/caveman.

Source

Thrown at packages/sdk/typescript/src/index.ts:883

}

// ─── Runtime policy client ────────────────────────────────────────────────────

/** Schema version this client accepts; anything else is rejected (fail closed). */
const RUNTIME_POLICY_SCHEMA_VERSION = "caveman.runtime-policy.v1";

/** Runtime-policy envelopes are KB-sized; stop a hostile body after 1 MiB. */
const RUNTIME_POLICY_MAX_RESPONSE_BYTES = 1024 * 1024;

async function readRuntimePolicyResponseText(response: Response): Promise<string> {
  const contentLength = response.headers?.get?.("content-length");
  if (typeof contentLength === "string" && /^[0-9]+$/.test(contentLength) && Number(contentLength) > RUNTIME_POLICY_MAX_RESPONSE_BYTES) {
    await Promise.resolve(response.body?.cancel?.()).catch(() => undefined);
    throw new Error("oversized_response");
  }

  const reader = response.body?.getReader?.();
  if (!reader) throw new Error("bounded_response_unavailable");
  const chunks: Uint8Array[] = [];
  let total = 0;
  try {
    while (true) {
      const { done, value } = await reader.read();
      if (done) break;
      if (!(value instanceof Uint8Array)) throw new Error("runtime policy response stream returned invalid bytes");
      total += value.byteLength;
      if (total > RUNTIME_POLICY_MAX_RESPONSE_BYTES) {
        await Promise.resolve(reader.cancel()).catch(() => undefined);
        throw new Error("oversized_response");
      }
      chunks.push(value);
    }
  } finally {
    try {
      reader.releaseLock();
    } catch {

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. A bounded response could not be produced; retry with a smaller scope.

When it happens

Trigger: Thrown at packages/sdk/typescript/src/index.ts:883 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/c1b7604c0f206d90. Report an issue: GitHub.