Error Taxonomy
256 words1 min read4 subsectionsFrom the README at ft 0.15.21
Every ft error is a typed envelope with a stable code, a human-readable message, and an optional actionable hint. The taxonomy is operator-readable and machine-routable.
Code prefixes
| Prefix | Meaning |
|---|---|
robot.* |
Robot Mode surface errors (most common; one per failure mode) |
policy.* |
Policy decision errors (deny, require_approval) |
mission.* |
Mission lifecycle errors |
tx.* |
Tx prepare/commit/compensate errors |
envelope.* |
Operating-envelope admission verdicts |
storage.* |
DB / FTS5 / migration errors |
wezterm.* |
Mux backend errors (subset of robot.wezterm_*) |
cass.* |
Cross-Agent Session Search errors |
caut.* |
Errors from the caut account-usage CLI wrapper |
connector.* |
Connector fabric errors |
Categories (ErrorCategory)
Each code is classified into a category for routing, one per code range: Wezterm (1xxx), Storage (2xxx), Pattern (3xxx), Policy (4xxx), Workflow (5xxx), Network (6xxx), Config (7xxx), and Internal (9xxx). Categories enable bulk policy decisions (e.g., "retry every Network error, alert on every Internal").
Retryability
Each code has a is_retryable() verdict. Examples of retryable codes: robot.wezterm_not_running, robot.timeout, robot.cass_timeout, robot.rate_limited, robot.circuit_open, robot.tx_lock_failed, robot.tx_in_progress. Non-retryable codes include pane-not-found (the pane really doesn't exist; retrying won't help) and policy-denied (deny is a decision, not a transient).
Actionable hints
The hint_for(code) -> Option<&'static str> registry maps codes to operator suggestions. When a caller doesn't set a site-specific hint, the central registry provides a fallback. Unknown codes return None — callers are not allowed to fabricate generic hints; an absent hint is the signal that the code needs an entry in the registry. The registry is allocation-free (&'static str).
This pattern (ft-tzolj) closed the class of error responses that shipped hint: None and left operators to look up the code in external docs.