Error codes
165 codes. Every details_url a centrs error carries points at one of these pages.
| Code | Summary |
|---|---|
auth/failed | Batch SSH authentication failed (execute --via ssh, sftp transfer). |
cdb/already-exists | devices add refused: a saved device with that target and user already exists. Nothing was written. |
cdb/conflict | The CDB changed after it was loaded; the stale write was refused so no change is lost. |
cdb/create-failed | A new CDB file could not be created at the resolved location. |
cdb/created | No CDB was at the default path, so centrs created an empty one there (warning). |
cdb/decrypt-failed | The encrypted CDB could not be decrypted (wrong or missing password). |
cdb/empty-group | The named CDB group contains no records: a warning for a read, an error for a write-shaped fan-out. |
cdb/empty-selection | The target selection matched no CDB records: a warning for a read, an error for a write-shaped fan-out. |
cdb/encrypt-failed | The CDB could not be rewritten with encryption. |
cdb/file-exists | `devices init` found a CDB already at the resolved location and wrote nothing. |
cdb/invalid-option | A saved device property has a value centrs cannot use; it is ignored and the next setting source applies (warning). |
cdb/invalid-record | A device record failed validation (a blank target or a wrong field type). Nothing was written. |
cdb/lock-unsupported | The CDB filesystem does not support the hard links required for write locking. |
cdb/locked | Another writer held the CDB lock past the wait timeout; nothing was written. |
cdb/not-found | The CDB file does not exist, or could not be created. |
cdb/not-found-target | No CDB entry matched the requested target string. |
cdb/override-applied | The device's saved via property was overridden by --via or CENTRS_VIA (warning). |
cdb/parse-failed | The CDB file could not be parsed. |
cdb/password-not-needed | A CDB password was given for an unencrypted CDB and was ignored (warning). |
cdb/password-required | A CDB password is required for decryption or explicit encryption. |
cdb/plaintext-backups | CDB backups may still contain plaintext credentials after encryption. |
cdb/reserved-key | devices add or set got key=value for a field with its own flag (user, password, group, profile, session). Nothing was written. |
cdb/reserved-option | A saved device has user, password, group, profile or session as a key=value property; it is ignored (warning). |
cdb/target-not-registered | The target is not a registered CDB device, and this surface only acts on registered devices. Register it with centrs_devices (op add) first. |
cdb/unknown-field | A device record holds CDB fields centrs cannot decode; they are kept byte for byte (warning). |
cdb/unknown-option | A device's key=value is not a centrs device property. centrs keeps it, but it has no effect; with --strict, devices add and set refuse it. |
cdb/write-not-permitted | An MCP write was refused because the device's mcp property is ro (the default). Nothing was sent. |
cmr/caller-policy-not-enforced | Warning: the controller login lacks a policy the CMR command runs with on the clients, and RouterOS does not check it. |
cmr/cancelled | The operation was cancelled before the command was sent to a CMR client. |
cmr/client-disconnected | CMR skipped a client that is not connected to its controller; the command was not sent. |
cmr/client-script-not-validated | Warning: a caller-addressed `/cmr/device/run-script` was validated as a controller request; its script was not validated on the clients. |
cmr/console-only | The CMR command is an interactive console view that breaks an API session, so centrs refused it before running it. |
cmr/empty-selection | The CMR selection matched no device on the controller: for `--cmr`, a warning for a read and an error for a write; for a fleet command such as `/cmr/vlan/add`, a warning. |
cmr/membership-changed | A CMR client left the label selection or changed its key between validation and dispatch; the command was not sent. |
cmr/not-a-controller | The target does not answer `/cmr/device`; it is not a CMR controller. |
cmr/outcome-unknown | The command was sent to a CMR client but no final status came back; it may still be running. |
cmr/output-truncated | Warning: CMR clipped a client's command output at its ~60 KiB cap. |
cmr/policy-denied | A CMR client refused a statement because CMR scripts run without the policy it needs; earlier statements already ran. |
cmr/rule-selects-every-device | Warning: a CMR rule command has no device `labels` (and, for VLAN, no `port-labels`), so the rule applies to every device, the controller included. |
cmr/selection-includes-controller | Warning: a CMR fleet command selects the controller's own row as well as its clients. |
cmr/selection-incomplete | The controller did not answer whether every device matches the labels, so nothing was run. |
cmr/validation-incomplete | A CMR client's validation result was incomplete or clipped, so the command was not sent to it. |
discover/broadcast-unavailable | UDP broadcast could not be enabled, so discover only listened for unprompted announcements (warning). |
discover/failed | MNDP discovery failed with no more specific code. |
identity/ambiguous | The target matches more than one CDB entry. |
identity/no-match | The target has no CDB entry matching the requested --match selector. |
input/empty-stdin | A flag that reads its value from stdin (e.g. `--password-stdin`) received nothing. |
input/incomplete-gps | A device location was given without both lat and lon. Nothing was written. |
input/invalid-altitude | The altitude is not a number, or the altitude type is not MSL or AGL. Nothing was written. |
input/invalid-bbox | The --bbox is not south,west,north,east with south <= north and west <= east. Nothing was read or sent. |
input/invalid-command | The command line or request was malformed: an unknown command or flag, or a missing or invalid argument. |
input/invalid-coordinate | A latitude or longitude is not a decimal-degrees number in range. Nothing was written or sent. |
input/invalid-match | The --match value is not user=, target= or a record type. Nothing was changed. |
input/invalid-path | An api endpoint or file path cannot be sent as given (row id, empty path, or a character SFTP cannot quote). That path was not sent; a transfer may have read other paths first. |
input/invalid-query | A --query expression does not parse as a `print where` condition. |
input/invalid-radius | The --near radius is not a non-negative number with an optional m/km/mi/ft unit. Nothing was read or sent. |
input/invalid-routeros-path | The RouterOS path is malformed: not slash-prefixed, a segment that is not a menu name, or characters a REST URL would reinterpret. |
input/invalid-stdin | A flag that reads its value from stdin (e.g. `--password-stdin`) received bytes that are not valid UTF-8 text, or began with a byte-order mark. |
input/invalid-target | The target string is invalid for the requested operation. |
input/local-destination | A local download destination cannot be written (missing parent directory, a directory, or no permission). |
input/local-file-not-found | A local file centrs was given could not be read. Nothing was sent. |
input/mac-address | The value is not a MAC address of six hex octets. Nothing was sent. |
input/max-results-exceeded | The result was larger than the --max-results budget, so it was withheld. retrieve changed nothing; execute had already run the command. |
input/unsupported-query | A --query uses something the RouterOS API query cannot run (`~`, `in`, a `$variable` or `[command]`). |
internal/byte-string | A binary RouterOS word held a character that is not a byte. |
internal/devices-failed | A devices command failed with an error centrs has no code for (a centrs bug). |
internal/mcp-start | centrs mcp failed to start; no MCP session began. |
internal/mcp-tool | An MCP tool failed with an error centrs has no code for (a centrs bug). |
internal/native-api-length | A native-API word length could not be encoded, so the command with that word was not sent (a centrs bug). |
internal/settings-failed | A settings command failed with an error centrs has no code for (a centrs bug). |
internal/unhandled | A command failed with an error centrs has no code for (a centrs bug). |
internal/unreachable | centrs reached a state its code treats as impossible (a centrs bug). |
mndp/encode-failed | An MNDP packet could not be built: a MAC or IPv4 field is malformed. Nothing was sent. |
mndp/listen-failed | The MNDP UDP listener could not bind. |
mndp/malformed | An MNDP datagram could not be decoded; discover skips it and counts it as a warning. |
quickchr/machine-not-found | No quickchr machine is registered under that name. |
quickchr/machine-stopped | The quickchr machine is not running, so it has no live connection facts. |
quickchr/package-unavailable | The optional `@tikoci/quickchr` package is not installed. |
quickchr/ssh-auth-unavailable | The quickchr machine forwards SSH but vouches for no verified SSH key, so no non-interactive SSH/SFTP login is possible. |
quickchr/unsupported | The installed `@tikoci/quickchr` is too old or speaks a newer descriptor version than centrs understands. |
quickchr/unsupported-via | The chosen `--via` has no usable service on the quickchr machine (not forwarded, or marked unavailable). |
routeros/action-timed-out | RouterOS dropped a command's reply at that command's own limit (native-API `action timed out`); the command may still be running or may have finished. |
routeros/api-fatal | RouterOS ended the native-API session with a !fatal reply. |
routeros/api-protocol | A RouterOS native API reply could not be parsed. |
routeros/api-trap | RouterOS reported an error on a native-API command, with a message centrs has no specific code for. The command may have partly run. |
routeros/btest-connection-count-single-stream | Fewer TCP data connections were opened than --connection-count requested (e.g. authenticated multi-connection is not yet supported), so throughput will not scale to the full count. |
routeros/btest-protocol | A bandwidth-test (btest) packet could not be decoded. |
routeros/btest-too-many-sessions | The btest server refused a client because max-sessions is reached. |
routeros/btest-udp-tx-size-ignored | For UDP --direction both, the btest wire protocol carries a single tx-size; --remote-udp-tx-size is ignored and --local-udp-tx-size is used for both directions. |
routeros/command-failed | RouterOS reported a command failure. |
routeros/ec-srp5-protocol | An EC-SRP5 authentication message or key could not be processed. |
routeros/invalid-value | RouterOS rejected the value supplied for an argument. |
routeros/mac-telnet-error | The device sent a MAC-Telnet error packet and the session ended. |
routeros/mac-telnet-not-ready | A MAC-Telnet session was used before it was open, or after it closed. |
routeros/mac-telnet-protocol | A MAC-Telnet datagram for this session could not be decoded, and centrs closed the session. |
routeros/mac-telnet-unsupported-auth | The device requested an unsupported MAC-Telnet auth mode. |
routeros/no-such-item | The RouterOS menu exists, but no item matches the id, number or name given. |
routeros/permission-denied | RouterOS refused the command because the user's group lacks a policy it needs. |
routeros/protocol-not-implemented | This command does not run over the requested --via protocol yet. |
routeros/request-failed | RouterOS reported an error on a REST, SSH or MAC-Telnet request, with a message centrs has no specific code for. The command may have partly run. |
routeros/session-closed | RouterOS closed the session before the request completed. |
routeros/unknown-attribute | RouterOS does not recognize the supplied attribute. |
routeros/unknown-path | RouterOS has no command at the requested path. |
routeros/unsupported-capability | The --via protocol cannot do what this command needs. |
routeros/version-unsupported | The device's RouterOS version does not provide the operation this command needs. |
settings/consequential-value | `settings set` accepted a syntactically valid value with a real, non-obvious consequence (e.g. a global --insecure default, or a transfer-via value gated elsewhere). |
settings/invalid-boolean | A boolean-like setting received a non-boolean value. |
settings/invalid-format | An unsupported output format was requested. |
settings/invalid-integer | An integer setting received a non-integer or out-of-range value. |
settings/invalid-timeout | A timeout setting received an invalid value. |
settings/invalid-via | An unsupported protocol identifier was supplied to --via. |
settings/reserved-key | `settings set`/`reset` refused a credential-shaped or self-referential CENTRS_* key. |
settings/skip-env-file-active | `settings print` ran under --skip-env-file; the shown centrs.env values would not apply to other commands run in the same environment. |
settings/unknown-key | `settings get`/`set` received a token that is not a recognized CENTRS_*-shaped setting. |
settings/unsafe-protocol-blocked | A cleartext protocol (e.g. ftp) was requested without the explicit ALLOW_UNSAFE_PROTOCOLS opt-in. |
target/mac-not-in-arp | The MAC is not in the host ARP cache, so it cannot be resolved to an IP. |
target/mac-required | The chosen L2 transport (mac-telnet) needs a MAC-address target. |
target/mac-unresolved | The MAC target could not be resolved to a host. |
target/unresolved | No connectable host for this target: no target was given, --host or CENTRS_HOST was empty, or the selection named the credential-only __default__ record. |
transport/auth-failed | RouterOS rejected the credentials over the transport. |
transport/auto-method | With no --via, transfer chose sftp because the upload is over 60 KB (warning). |
transport/cancel-unacknowledged | RouterOS did not acknowledge a stream's /cancel within the timeout; centrs ended the stream and closed the session locally. |
transport/capability-unsupported | The chosen transport cannot perform this kind of operation. |
transport/checksum-unavailable | RouterOS gives no file digest for --verify checksum: REST/native compared sizes instead, and SFTP compared nothing (warning). |
transport/connection-closed | The transport connection was closed before a result. |
transport/connection-refused | The device refused the connection. |
transport/dns | The device host name could not be resolved. |
transport/edge-auth-failed | An HTTP layer in front of RouterOS (auth proxy, tunnel edge, WAF) refused the request before RouterOS answered it. |
transport/host-key-mismatch | The device's SSH host key did not match the known key. |
transport/incomplete-transfer | A file transfer could not be verified: its size did not match, or RouterOS showed none. |
transport/insecure-trust | Insecure mode is on, so TLS certificates and SSH host keys are not verified (warning). |
transport/local-tool-missing | A required local CLI (e.g. the OpenSSH `sftp` client) is not installed or not on PATH. |
transport/network | A network request to the device failed. |
transport/provider-trust | Peer verification is relaxed for a named-live-provider endpoint (a quickchr VM's self-signed TLS cert / ephemeral SSH host key), trusted by the provider's loopback-forward voucher. |
transport/stream-overflow | More stream replies were waiting unread than the buffer allows, so centrs ended the stream rather than drop any. |
transport/timeout | The transport request timed out. |
transport/tls-certificate | TLS certificate validation failed for the device. |
transport/unsupported-operation | The transfer method cannot do this operation (copy over sftp, or an upload over 60 KB over rest/native). Nothing was written; a copy may have looked up its files first. |
transport/write-outcome-unknown | Warning: a write failed after it was sent, so it may have run on the router; centrs did not retry it. |
usage/confirmation-required | A write-shaped command needs explicit confirmation (pass confirm:true / --yes after review). |
usage/conflicting-flags | Two or more supplied flags conflict. |
usage/fanout-not-supported | The command or mode cannot fan out across multiple targets (e.g. terminal, --listen/--stream). |
usage/flag-after-separator | A centrs flag was written after `--`, where every token is RouterOS input. |
usage/invalid-concurrency | --concurrency is not a whole number of at least 1. Nothing was sent. |
usage/invalid-cursor | An explain --cursor is not a byte offset inside the input being analyzed. |
usage/invalid-method | The -X/--method value is not a supported HTTP method. |
usage/missing-flag-value | A flag that needs a value was given none, or was followed by another flag. |
usage/missing-group | A group fan-out was asked for with an empty group name. Nothing was sent. |
usage/missing-labels | `--cmr` was given without a `--labels` expression. |
usage/not-implemented | This command form is recognized but not built yet (devices edit; transfer via scp, fetch or ftp). Nothing was sent. |
usage/removed-flag | A flag or request field was removed; the error names its replacement. |
usage/stdin-ignored | stdin was redirected but the input came from the positional argument, so anything piped in was not analyzed. |
usage/stdin-is-tty | A flag that reads its value from stdin (e.g. `--password-stdin`) was given while stdin is a terminal. |
usage/target-exists | The destination already exists on the router, and centrs does not overwrite it without --force. Nothing was changed. |
usage/timeout-out-of-range | The --timeout is longer than REST's 60-second ceiling. Nothing was sent. |
validation/menu-unavailable | RouterOS 7 publishes this menu or command, but this device does not have it — usually hardware, build or version. |
validation/not-followable | The RouterOS menu cannot be followed: it is a single record, or its print has no follow-only. |
validation/not-implemented | Retired: emitted by 0.1.0–0.1.7 for a validation feature that was not built yet. |
validation/option | An option value is outside what centrs accepts. |
validation/package-missing | This device has no such menu or command; MikroTik publishes it in a package that is likely not installed. |
validation/syntax | The command syntax was rejected by the validation gate — offline analysis, or the RouterOS :parse probe. |
validation/unknown-attribute | An attribute is not valid for the path/verb per /console/inspect. |
validation/unknown-path | The RouterOS path does not exist, or does not expose the requested command. |
wait/deadline-exceeded | The wait deadline passed before readiness or its condition was established. |
wait/interrupted | The wait was cancelled before readiness or its condition was established. |
centrs error pages
Each CentrsError carries a details_url of
the form https://tikoci.dev/centrs/errors/<code>/.
This directory holds the human-readable page for each code, and is the
home for the error URL scheme and the
RouterOS-fault mapping (below); the constitution keeps
only the one-line contract.
URL scheme
details_url is
https://tikoci.dev/centrs/errors/<code>/, with
<code> the slash-namespaced code as-is and a trailing
slash (e.g.
https://tikoci.dev/centrs/errors/routeros/unknown-path/).
The host is the site's canonical custom domain over HTTPS, and the trailing slash is the page's own URL, so a fetch gets 200 with no redirect. Links emitted before 0.2.0 used
https://tikoci.github.io/centrs/errors/<code>; GitHub Pages still redirects those to the custom domain, but through plain HTTP, which some agent fetch tools refuse to follow (#464).The URL is normalized; the GitHub Pages site routes it to a human page — not the typedoc URL (typedoc lives elsewhere).
Adding an error code requires adding a Pages entry under the same path: code and page ship together, and a missing page is a centrs bug.
The URL must stay stable across centrs versions; if a code is renamed, the old URL must redirect.
Source of truth and the contributor contract
The enumerable list of every code lives in code, not here: src/core/error-catalog.ts.
Every page in this directory is written by hand to the page contract
below. bun run docs:errors scaffolds a stub for a code that
has no page, and never overwrites a page that exists.
When you introduce a new error code you must, in the same change:
- add an entry to
src/core/error-catalog.ts, and - add a
docs/errors/<code>.mdpage: runbun run docs:errors, then replace the stub with a real page. A stub fails the test.
test/unit/error-pages.test.ts enforces this three-way
consistency — every live code: literal is cataloged, every
catalogued code has a page, and no page is orphaned. A missing page is a
centrs bug, so the guard fails the build.
Families
Codes are slash-namespaced family/slug. The families and
where they originate:
auth/*— credential rejection.cdb/*— WinBox CDB load, parse, decrypt, mutation, and allowlist policy (src/data/,src/devices.ts,src/resolver/cdb.ts).discover/*— MNDP discovery (src/discover.ts).identity/*— target → CDB record resolution (src/resolver/).input/*— malformed caller input (paths, MACs, arguments).internal/*— centrs bugs / unreachable states.mndp/*— MNDP wire codec and listener (src/data/mndp.ts).quickchr/*— the quickchr named-live-provider (--quickchr <name>): optional package availability, descriptor version support, and machine lookup/liveness (src/resolver/quickchr-provider.ts).routeros/*— RouterOS-surfaced faults mapped by the grounded vocabulary insrc/core/routeros-errors.ts(RESTdetailand native-api!trap, identical on CHR 7.23).settings/*— settings/value parsing (src/resolver/settings.ts) and thecentrs settingscommand's own registry/refusal rules (src/settings.ts).target/*— turning a<router>into a transport endpoint.transport/*— connection, TLS, DNS, and timeout plumbing.usage/*— how a command was invoked (arity, conflicting flags, confirmation).validation/*— the canonicalize → validate gate (:parse+/console/inspect).wait/*— readiness/condition deadlines and cancellation (retrieveWait).
The Pages build lists every code on the catalog index and rewrites
the pages' relative links for the site.
test/unit/error-pages.test.ts checks those links on every
PR, and fails on any page that is still a scaffold stub (#659): a new
code ships with a written page.
Page contract
The envelope already carries the code, a one-line
summary and a one-line remediation. A page is
for what does not fit on that line: fixes that depend on the transport,
version or platform, causes that interact, and the cases with no fix.
Keep pages short. This shape is a baseline for authors and reviewers,
not a form to fill; leave a section out when it has nothing to say, and
depart from it when a code needs to.
- H1 —
# `<code>`, exactly (the test checks it). - Lead (one or two sentences, required) — what failed, and whether anything ran or changed on the device. It must agree with the catalog summary, which MCP resources serve on its own.
- Emitted by (required when more than one command or
transport raises it) — which commands and
--viatransports. This tells a reader whether switching transport can help. - Context — what each
context.*key means. - Typical triggers — each one says where it comes from: (code) read from the emission site, (CHR 7.x) reproduced on a device, (field) seen in a real session, or (unverified). An unverified trigger is allowed and is better than silence; it is never written as fact.
- Fix — ordered, concrete
centrsand RouterOS commands. - Limits — RouterOS versions, platforms or transports where no fix exists.
- If this looks wrong — the centrs bug it most likely
is (a missing mapping, a wrong suggestion, a stale install) and what to
put in an issue: the command, the
--jsonenvelope,centrs --version, and an ask to remove passwords and other secrets from both first. There is no--bug-reportflag. - Related — sibling codes, as relative
.mdlinks.
RouterOS-side claims follow routeros-grounding.instructions.md.
A page for a code that only rides as a warning (warnings carry no
details_url) is reached from this index alone, so it can be
a lead and a fix. internal/* pages say that the code is a
centrs bug and what to report.
A code that is no longer emitted keeps its page, marked Retired in the lead, when it shipped in a release (the URL is stable). A code that never shipped is removed with its page.
Tips
Tips follow the same contract with one difference: most tips need no
page. A tip is advice whose message and fix
already say everything; it gets a page only when its advice does not fit
in one sentence of about 40 words, or when it depends on the version,
platform or transport. A tip with a page is flagged
page: true in src/core/tip-catalog.ts,
its page is docs/tips/<slug>.md, and only then does
it carry a detailsUrl
(https://tikoci.dev/centrs/tips/<slug>/, without the
tip/ segment). test/unit/tip-catalog.test.ts
keeps the flag and the file in step, and checks the page's links. The
Pages build publishes each page as tips/<slug>/ with
the same link rewriting and checks as the error pages;
test/unit/pages-site.test.ts assembles the site and fails
when a tip's detailsUrl names no published page.
RouterOS-fault mapping
(routeros/*)
The authoritative vocabulary for routeros/* is the live
router's own strings (grounded on CHR 7.23): the REST
detail field on HTTP ≥400 — shape
{"detail":"<msg>","error":<http-status>,"message":"<http reason>"}
— and the native-api !trap carry the same
text for the same fault, so one shared table
(src/core/routeros-errors.ts) maps both transports. The
original string is always preserved — in context.detail for
a matched rule, and in cause for the catch-all
(routeros/request-failed). Ground new mappings on CHR
evidence, not assumption (tikoci/m2ir is protocol-IR
reference, not an accessible mapping source — the router strings
are).