{"record":{"id":"20b59b2d92beba9f","repo":"paperclipai/paperclip","slug":"dns-resolution-failed-for-originalhostname","errorCode":null,"errorMessage":"DNS resolution failed for ${originalHostname}: ${(err as Error).message}","messagePattern":"DNS resolution failed for (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-host-services.ts","lineNumber":223,"sourceCode":"\n    const resolved = safeResults[0]!;\n    return {\n      parsedUrl: parsed,\n      resolvedAddress: resolved.address,\n      hostHeader,\n      tlsServername: parsed.protocol === \"https:\" && isIP(originalHostname) === 0\n        ? originalHostname\n        : undefined,\n      useTls: parsed.protocol === \"https:\",\n    };\n  } catch (err) {\n    // Re-throw our own errors; wrap DNS failures\n    if (err instanceof Error && (\n      err.message.startsWith(\"All resolved IPs\") ||\n      err.message.startsWith(\"DNS resolution returned\") ||\n      err.message.startsWith(\"DNS lookup timed out\")\n    )) throw err;\n    throw new Error(`DNS resolution failed for ${originalHostname}: ${(err as Error).message}`);\n  }\n}\n\nfunction buildPinnedRequestOptions(\n  target: ValidatedFetchTarget,\n  init?: RequestInit,\n): { options: HttpRequestOptions & { servername?: string }; body: string | undefined } {\n  const headers = new Headers(init?.headers);\n  const method = init?.method ?? \"GET\";\n  const body = init?.body === undefined || init?.body === null\n    ? undefined\n    : typeof init.body === \"string\"\n      ? init.body\n      : String(init.body);\n\n  headers.set(\"Host\", target.hostHeader);\n  if (body !== undefined && !headers.has(\"content-length\") && !headers.has(\"transfer-encoding\")) {\n    headers.set(\"content-length\", String(Buffer.byteLength(body)));","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/plugin-host-services.ts#L205-L241","documentation":"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.","triggerScenarios":"Thrown at server/src/services/plugin-host-services.ts:223 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix DNS resolution for the hostname (network, resolver config) and retry."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}