{"record":{"id":"cbc941b40fd407e5","repo":"paperclipai/paperclip","slug":"dns-resolution-returned-no-results-for-originalh","errorCode":null,"errorMessage":"DNS resolution returned no results for ${originalHostname}","messagePattern":"DNS resolution returned no results for (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-host-services.ts","lineNumber":193,"sourceCode":"  // We pin the resolved IP into the URL to eliminate the TOCTOU window\n  // between DNS resolution here and the second resolution fetch() would do.\n  const originalHostname = parsed.hostname.replace(/^\\[|\\]$/g, \"\"); // strip IPv6 brackets\n  const hostHeader = parsed.host; // includes port if non-default\n\n  // Race the DNS lookup against a timeout to prevent indefinite hangs\n  // when DNS is misconfigured or unresponsive.\n  const dnsPromise = dnsLookup(originalHostname, { all: true });\n  const timeoutPromise = new Promise<never>((_, reject) => {\n    setTimeout(\n      () => reject(new Error(`DNS lookup timed out after ${DNS_LOOKUP_TIMEOUT_MS}ms for ${originalHostname}`)),\n      DNS_LOOKUP_TIMEOUT_MS,\n    );\n  });\n\n  try {\n    const results = await Promise.race([dnsPromise, timeoutPromise]);\n    if (results.length === 0) {\n      throw new Error(`DNS resolution returned no results for ${originalHostname}`);\n    }\n\n    // Filter to only non-private IPs instead of rejecting the entire request\n    // when some IPs are private. This handles multi-homed hosts that resolve\n    // to both private and public addresses.\n    const safeResults = results.filter((entry) => !isPrivateIP(entry.address));\n    if (safeResults.length === 0) {\n      throw new Error(\n        `All resolved IPs for ${originalHostname} are in private/reserved ranges`,\n      );\n    }\n\n    const resolved = safeResults[0]!;\n    return {\n      parsedUrl: parsed,\n      resolvedAddress: resolved.address,\n      hostHeader,\n      tlsServername: parsed.protocol === \"https:\" && isIP(originalHostname) === 0","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/plugin-host-services.ts#L175-L211","documentation":"During plugin fetch validation, DNS resolution of the hostname returned an empty address list. The hostname resolves to nothing, so there is no address to pin for the request and the fetch is aborted.","triggerScenarios":"Thrown at server/src/services/plugin-host-services.ts:193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the hostname spelling and DNS configuration; the name resolved to no addresses."],"exampleFix":null,"handlingStrategy":"validation","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"}