paperclipai/paperclip · error · Error

DNS resolution failed for ${originalHostname}: ${(err as Err

Error message

DNS resolution failed for ${originalHostname}: ${(err as Error).message}

What it means

The DNS lookup itself failed (network error, NXDOMAIN, misconfigured resolver) while validating a plugin fetch URL. The wrapper re-raises the underlying resolver failure message for the original hostname.

Source

Thrown at server/src/services/plugin-host-services.ts:223

    const resolved = safeResults[0]!;
    return {
      parsedUrl: parsed,
      resolvedAddress: resolved.address,
      hostHeader,
      tlsServername: parsed.protocol === "https:" && isIP(originalHostname) === 0
        ? originalHostname
        : undefined,
      useTls: parsed.protocol === "https:",
    };
  } catch (err) {
    // Re-throw our own errors; wrap DNS failures
    if (err instanceof Error && (
      err.message.startsWith("All resolved IPs") ||
      err.message.startsWith("DNS resolution returned") ||
      err.message.startsWith("DNS lookup timed out")
    )) throw err;
    throw new Error(`DNS resolution failed for ${originalHostname}: ${(err as Error).message}`);
  }
}

function buildPinnedRequestOptions(
  target: ValidatedFetchTarget,
  init?: RequestInit,
): { options: HttpRequestOptions & { servername?: string }; body: string | undefined } {
  const headers = new Headers(init?.headers);
  const method = init?.method ?? "GET";
  const body = init?.body === undefined || init?.body === null
    ? undefined
    : typeof init.body === "string"
      ? init.body
      : String(init.body);

  headers.set("Host", target.hostHeader);
  if (body !== undefined && !headers.has("content-length") && !headers.has("transfer-encoding")) {
    headers.set("content-length", String(Buffer.byteLength(body)));

View on GitHub (pinned to a7e689b3c3)

Solutions

  1. Fix DNS resolution for the hostname (network, resolver config) and retry.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at server/src/services/plugin-host-services.ts:223 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18). Data as JSON: /api/errors/20b59b2d92beba9f. Report an issue: GitHub.