Handbook
Error codes
Generated from ErrorCode in crates/zp-core/src/error.rs. Don’t edit
this file: ZP_BLESS=1 cargo test -p zp-core regenerates it, and the
tests fail if it’s stale.
Every error has a stable numeric code. With --json it’s in
error.code, and C callers get it from libzenpac later. Codes are never
reused or renumbered; new ones are only added.
| Code | Meaning |
|---|---|
| 1 | The configuration couldn’t be loaded or written: a file is unreadable or unwritable, isn’t valid TOML, has an unknown key, or breaks a rule |
| 2 | A repo DB couldn’t be read or ingested, its index couldn’t be written, or an index file of the host (its list of namespaces or a namespace’s index) is unusable |
| 3 | Reading or writing a file failed |
| 4 | The repo, or any repo of the namespace, isn’t configured |
| 5 | A download failed: the host is unreachable, the connection broke off, or the server answered with an error |
| 6 | A signature or checksum didn’t verify, a signature is missing, or no trusted key is pinned for the namespace |
| 7 | The request can’t be met: a dependency is missing, packages conflict, or a hold or the official-package protection rules a package out |
| 8 | Something given on the command line or in a file isn’t valid, e.g. a package spec or repo name |
| 9 | Changing what’s installed failed: files conflict, the disk is full, a hook stopped it, a package to remove isn’t installed, or the local store couldn’t be read or written |
| 10 | The change installs packages while installed ones have newer versions in the repos, a partial upgrade: upgrade the system with it, or allow it explicitly |
| 11 | The change needs root, and zenpac couldn’t get it: no terminal for the password, no run0, sudo or doas, or elevate = "never" |
| 12 | Another zenpac has the local store open: the message names its process if it can. Waiting for it and trying again works |
| 13 | The namespace or repo doesn’t exist on its source: the host has no index file for the namespace, or the namespace doesn’t list the repo |
| 14 | The operation was cancelled through its handle, before the root changed: nothing was installed or removed |
From zenpac’s documentation: docs/reference/errors.md at v0.9.5.