pub enum TelemetryError {
Unavailable(String),
HookProtocol(String),
Internal(String),
}Expand description
Telemetry-side errors. The variants name the failure classes the spec uses for telemetry-derived receipts:
TelemetryError::Unavailable→telemetry_unavailableTelemetryError::HookProtocol→hook_protocol_errorTelemetryError::Internal→internal_error(the only one of the three currently named indocs/specs/lifecycle-contract/body.md).
The first two are pending as LifecycleReceipt::failure_class
variants — they are added to the receipt enum in a follow-up issue
once the spec body names them. Until then, callers wishing to emit a
failed receipt for these conditions should use internal_error and
attach the precise class via warnings.
Variants§
The telemetry source (file, directory, db) was missing, empty, or
stale. Distinct from internal_error because it’s an expected,
observable absence rather than a Lifeloop bug.
HookProtocol(String)
The shape of a parsed telemetry artifact violated the adapter’s
hook protocol contract (e.g. expected JSONL but lines were not
objects). Distinct from Unavailable because something was
there and it was wrong.
Internal(String)
Lifeloop failed unexpectedly while parsing telemetry.
Implementations§
Source§impl TelemetryError
impl TelemetryError
Sourcepub fn failure_class(&self) -> &'static str
pub fn failure_class(&self) -> &'static str
Stable wire string for the failure class this error maps to.
Trait Implementations§
Source§impl Debug for TelemetryError
impl Debug for TelemetryError
Source§impl Display for TelemetryError
impl Display for TelemetryError
Source§impl Error for TelemetryError
impl Error for TelemetryError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()