paperclipai/paperclip · error · CloudflareBridgeError

Cloudflare sandbox bridge request failed with HTTP

Error message

Cloudflare sandbox bridge request failed with HTTP ${response.status}.

What it means

Error "Cloudflare sandbox bridge request failed with HTTP ${response.status}." thrown in paperclipai/paperclip.

Solutions

  1. Check the bridge service status and logs for the reported HTTP status; verify the bridge URL and auth.

When it happens

Trigger: Thrown at packages/plugins/sandbox-providers/cloudflare/src/bridge-client.ts:122 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/3cd814f7a4c9e839. Report an issue: GitHub.

Appendix: source

Thrown at packages/plugins/sandbox-providers/cloudflare/src/bridge-client.ts:122

  path: string,
  init: RequestInit,
  extraHeaders: BridgeClientHeaders = {},
): Promise<T> {
  const controller = new AbortController();
  const requestTimeoutMs = resolveRequestTimeoutMs(config, path, init);
  const timeout = setTimeout(() => controller.abort(), requestTimeoutMs);
  const baseUrl = config.bridgeBaseUrl.replace(/\/+$/, "");

  try {
    const response = await fetch(`${baseUrl}${path}`, {
      ...init,
      headers: buildHeaders(config, extraHeaders),
      signal: controller.signal,
    });
    const body = await parseJson(response);
    if (!response.ok) {
      const errorBody = isRecord(body) ? body as BridgeErrorBody : {};
      throw new CloudflareBridgeError({
        status: response.status,
        code: typeof errorBody.error === "string" ? errorBody.error : null,
        message:
          typeof errorBody.message === "string" && errorBody.message.trim().length > 0
            ? errorBody.message
            : `Cloudflare sandbox bridge request failed with HTTP ${response.status}.`,
        details: errorBody.details,
      });
    }
    return body as T;
  } catch (error) {
    if (error instanceof CloudflareBridgeError) throw error;
    if ((error as { name?: string } | null)?.name === "AbortError") {
      throw new Error(
        `Cloudflare sandbox bridge request timed out after ${requestTimeoutMs}ms.`,
      );
    }
    throw error;

View on GitHub (pinned to 120ae5428f)