Expand description
Layer: Cross-cutting
Error type alias plus the exit-code taxonomy: a small, stable set of
process exit codes so an unattended scheduler can branch on the failure
class instead of grepping stderr. Before this, main exited 1 for every
error, forcing operators to regex the error text to decide retry-vs-stop.
Modules§
- codes
- Stable, greppable error codes carried by
CodedError. A scheduler / CI step matches on these (the JSONcodefield or the[CODE]text prefix) instead of the human wording, which is free to change. Every code shares theRIVET_CONFIG_orRIVET_SOURCE_prefix; thecodes_*guard tests assert distinctness + the prefix, mirroring the verify-layerRIVET_VERIFY_*guard.
Structs§
- Coded
Error - Typed marker carrying a stable error code (
RIVET_CONFIG_*/RIVET_SOURCE_*), for config / source failures that an operator’s tooling greps by code rather than by wording. - Data
Integrity Error - Typed marker for a data-integrity failure (exit
3). - Preclassified
Exit - Typed marker carrying an already-decided process exit code.
- Schema
Drift Error - Typed marker for a schema-drift failure (exit
4).
Enums§
- Exit
Class - Machine-actionable exit-code taxonomy.
Functions§
- classify_
exit - Map an error to its process exit code per the
ExitClasstaxonomy. - error_
code - The stable
RIVET_*error code for a failure, if one was tagged viaCodedErroranywhere in the anyhow context chain.mainsurfaces it as the JSONcodefield and a[CODE]prefix on the text error line.