# LPK-E0304 — registry unreachable or wrong response ## What it means Reading from a remote registry can fail on the way: the host may be down, the connection refused, or the answer may be a redirect or an error status instead of the file. The tool never follows a redirect silently and never treats an error page as data, so any of these becomes a refusal. Nothing is created or changed by the refusal. The fix sits outside the project: checking the address and the network, then running the same command again. Loopback addresses over plain HTTP exist for local checks; anything else requires a secure address. ## Example ```pkgtest {"files": {"law.toml": "[package]\nname = \"demo.mini\"\nversion = \"0.1.0\"\nlanguage = \"0.2\"\nnamespace = \"urn:law:demo:mini\"\n"}, "cmd": ["add", "foo", "--from", "local", "--registry", "local=http://127.0.0.1:9/", "--project", "."], "expect": "LPK-E0304"} ``` ## Fix ```pkgtest {"files": {}, "cmd": ["init", ".", "--name", "demo.diag"]} ``` ## Engine message The tool reports this in its own wording: ```text law: REFUSAL LPK-E0304: registry local, registry.json: http://127.0.0.1:9/registry.json ``` ## Related - [Package, context, snapshots](/recipes/n-package/) — what a project directory holds.