paperclipai/paperclip · error

HTTP invoke failed with status ${res.status}

Error message

HTTP invoke failed with status ${res.status}

What it means

Remote-call failure in the HTTP adapter's execute: fetch() to the configured url completed but the response status was non-2xx. The message carries the HTTP status so callers can distinguish an unhealthy endpoint from network/timeout errors.

Source

Thrown at server/src/adapters/http/execute.ts:30

  const payloadTemplate = parseObject(config.payloadTemplate);
  const body = { ...payloadTemplate, agentId: agent.id, runId, context };

  const controller = new AbortController();
  const timer = timeoutMs > 0 ? setTimeout(() => controller.abort(), timeoutMs) : null;

  try {
    const res = await fetch(url, {
      method,
      headers: {
        "content-type": "application/json",
        ...headers,
      },
      body: JSON.stringify(body),
      ...(timer ? { signal: controller.signal } : {}),
    });

    if (!res.ok) {
      throw new Error(`HTTP invoke failed with status ${res.status}`);
    }

    return {
      exitCode: 0,
      signal: null,
      timedOut: false,
      summary: `HTTP ${method} ${url}`,
    };
  } catch (err) {
    if (timer && err instanceof Error && err.name === "AbortError") {
      return {
        exitCode: null,
        signal: null,
        timedOut: true,
        errorMessage: `HTTP ${method} ${url} timed out after ${timeoutMs}ms`,
        errorCode: "timeout",
      };
    }

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Check the target service and request payload; the endpoint returned a non-success HTTP status.
  2. Inspect the response body/logs of the invoked service for the underlying failure.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/src/adapters/http/execute.ts:30 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/3edacee03295d928. Report an issue: GitHub.