Skip to main content

Module error

Module error 

Source
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 JSON code field or the [CODE] text prefix) instead of the human wording, which is free to change. Every code shares the RIVET_CONFIG_ or RIVET_SOURCE_ prefix; the codes_* guard tests assert distinctness + the prefix, mirroring the verify-layer RIVET_VERIFY_* guard.

Structs§

CodedError
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.
DataIntegrityError
Typed marker for a data-integrity failure (exit 3).
PreclassifiedExit
Typed marker carrying an already-decided process exit code.
SchemaDriftError
Typed marker for a schema-drift failure (exit 4).

Enums§

ExitClass
Machine-actionable exit-code taxonomy.

Functions§

classify_exit
Map an error to its process exit code per the ExitClass taxonomy.
error_code
The stable RIVET_* error code for a failure, if one was tagged via CodedError anywhere in the anyhow context chain. main surfaces it as the JSON code field and a [CODE] prefix on the text error line.

Type Aliases§

Result