{"record":{"id":"0fda36ffdfcc0ed8","repo":"ory/hydra","slug":"unable-to-load-remote-file","errorCode":null,"errorMessage":"unable to load remote file","messagePattern":"unable to load remote file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"oryx/osx/file.go","lineNumber":181,"sourceCode":"\t\t\treturn nil, errors.Wrap(err, \"unable to read the file\")\n\t\t}\n\tcase \"file\":\n\t\tif o.disableFileLoader {\n\t\t\treturn nil, errors.New(\"file loader disabled\")\n\t\t}\n\n\t\t//#nosec G304 -- false positive\n\t\tbytes, err = os.ReadFile(parsed.Host + parsed.Path)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to read the file\")\n\t\t}\n\tcase \"http\", \"https\":\n\t\tif o.disableHTTPLoader {\n\t\t\treturn nil, errors.New(\"http(s) loader disabled\")\n\t\t}\n\t\tresp, err := o.hc.Get(parsed.String())\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to load remote file\")\n\t\t}\n\t\tdefer resp.Body.Close()\n\n\t\tbytes, err = io.ReadAll(resp.Body)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to read the HTTP response body\")\n\t\t}\n\tcase \"base64\":\n\t\tif o.disableBase64Loader {\n\t\t\treturn nil, errors.New(\"base64 loader disabled\")\n\t\t}\n\n\t\tif o.disableResilientBase64Loader {\n\t\t\tbytes, err = o.base64enc.DecodeString(strings.TrimPrefix(source, \"base64://\"))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.Wrap(err, \"unable to base64 decode the location\")\n\t\t\t}\n\t\t\treturn bytes, nil","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/ory/hydra/blob/4174065ffb052799890f7480f5360a877a67ffc1/oryx/osx/file.go#L163-L199","documentation":"Returned by readFile when the configured HTTP client's GET request for an http(s):// source fails at the transport level — DNS failure, connection refused, TLS error, or timeout. The remote file was never fetched; the wrapped error identifies the network cause.","triggerScenarios":"Thrown at oryx/osx/file.go:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity, DNS, and the URL's host for typos","If TLS fails, verify certificates or configure the custom HTTP client via WithHTTPClient","Retry transient network failures; consider a client with retry policy"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4174065ffb052799890f7480f5360a877a67ffc1","analyzedAt":"2026-09-03T14:52:41.581Z","contentChangedAt":"2026-09-03T14:52:41.581Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}