{"record":{"id":"229af8faad0e15f1","repo":"apple/pkl","slug":"ioerrormakinghttpget","errorCode":"ioErrorMakingHttpGet","errorMessage":"ioErrorMakingHttpGet","messagePattern":"ioErrorMakingHttpGet","errorType":"error_code","errorClass":"PackageLoadError","httpStatus":null,"severity":"error","filePath":"pkl-core/src/main/java/org/pkl/core/packages/PackageResolvers.java","lineNumber":209,"sourceCode":"            requestUri);\n      }\n    }\n\n    protected InputStream openExternalUri(URI uri) throws SecurityManagerException {\n      if (!HttpUtils.isHttpUrl(uri)) {\n        throw new IllegalArgumentException(\"Expected HTTP(S) URL, but got: \" + uri);\n      }\n\n      // treat package assets as resources instead of modules\n      securityManager.checkReadResource(uri);\n      var request = HttpRequest.newBuilder(uri).build();\n      HttpResponse<InputStream> response;\n      try {\n        response =\n            httpClient.send(\n                request, BodyHandlers.ofInputStream(), securityManager::checkReadResource);\n      } catch (IOException e) {\n        throw new PackageLoadError(e, \"ioErrorMakingHttpGet\", uri, e.getMessage());\n      }\n      try {\n        HttpUtils.checkHasStatusCode200(response);\n      } catch (IOException e) {\n        throw new PackageLoadError(\"badHttpStatusCode\", response.statusCode(), response.uri());\n      }\n      return response.body();\n    }\n\n    protected IOException fileIsADirectory() {\n      // Sync with error message from `Files#readString(Path)`\n      return new IOException(\"Is a directory\");\n    }\n\n    protected abstract DependencyMetadata doGetDependencyMetadata(\n        PackageUri packageUri, @Nullable Checksums checksums)\n        throws IOException, SecurityManagerException;\n","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/apple/pkl/blob/f3efcbfc9b60d30053b0536d664948d7aa1b8673/pkl-core/src/main/java/org/pkl/core/packages/PackageResolvers.java#L191-L227","documentation":"The HTTP client failed at the I/O level while downloading a package resource from an external URI, so Pkl throws PackageLoadError ioErrorMakingHttpGet. Unlike badHttpStatusCode (a non-200 response), this indicates the request itself could not be completed — connection failure, DNS failure, TLS error, timeout, or connection reset.","triggerScenarios":"httpClient.send in openExternalUri throws IOException — unreachable host, refused connection, DNS resolution failure, TLS handshake failure, socket/read timeout, or the connection being reset mid-download.","commonSituations":"No internet or DNS misconfiguration; corporate proxy/firewall blocking the package repository host; repository temporarily down; VPN required; TLS interception with an untrusted certificate.","solutions":["Check basic connectivity: curl -v the URL from the error to reproduce the failure.","Configure proxy settings (HTTPS_PROXY / JVM https.proxyHost) if you are behind a corporate proxy.","Retry later if the repository is down; check the registry's status page.","Fix DNS/VPN/TLS trust issues (import corporate CA into the truststore) as appropriate."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// shell: probe reachability before resolving packages\n// curl -fsS --max-time 10 -o /dev/null \"$URL\" && echo ok || echo 'package host unreachable'","typeGuard":null,"tryCatchPattern":"// catch ioErrorMakingHttpGet and retry with backoff\ntry {\n  resolvePackages();\n} catch (PackageLoadError e) {\n  if (e.getCode().equals(\"ioErrorMakingHttpGet\")) {\n    retryWithBackoff(3);\n  } else { throw e; }\n}","preventionTips":["Configure proxy environment variables when behind a corporate network.","Import corporate TLS CAs into the JVM truststore.","Check registry status pages before large CI runs; pin a fallback mirror."],"tags":["pkl","network","http","package-management"],"backgroundTag":"http-request-failed","analyzedSha":"f3efcbfc9b60d30053b0536d664948d7aa1b8673","analyzedAt":"2026-09-08T13:10:45.570Z","contentChangedAt":"2026-09-08T13:10:45.570Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}