#[non_exhaustive]pub enum StikkError {
Refusal {
message: String,
},
LockConflict {
message: String,
},
NotReady {
detail: String,
},
IntegrityFinding {
message: String,
},
Limits {
message: String,
},
Environment {
detail: String,
source: Option<Box<dyn Error + Send + Sync + 'static>>,
},
Internal {
detail: String,
},
}Expand description
Every error stikk surfaces, tagged with the class that decides how it is presented (design
stikk-04 CT-04). The class is the whole point: a refusal opens the explanation overlay, a lock
conflict is a banner, a not-ready is inline guidance, and so on — one mapping, both frontends.
#[non_exhaustive]: adding a class later is not a breaking change to downstream matchers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Refusal
prikk semantically refused an operation (a non-confluent merge, a TOFU key conflict, a
path/ref validation refusal). message is prikk’s own wording, preserved verbatim.
LockConflict
Another writer holds a lock, or a CAS precondition failed. Presented as “another writer is active”, never as corruption (design FR-106). prikk distinguishes a genuine lock from a ref-CAS mismatch; both arrive here and the message carries which.
NotReady
A signing or trust prerequisite is absent — no AUTHOR/MAINTAINER readiness, or the maintainer key is not adopted. Presented as inline guidance toward the trust/keys surface (FR-104).
Fields
IntegrityFinding
A verify/doctor finding — repository-content diagnostics. Routed into the verify/doctor views, never a popup (design OP-03).
Limits
An input ceiling was (or would be) exceeded — a bundle/exchange/summary limit. Surfaced in the pre-execution confirmation, not after failure (threat model C-D2a).
Environment
An environment problem: I/O, permissions, a missing or wrong prikk binary, version skew, or
an unparseable prikk output shape. Carries a stikk-authored description plus any underlying
cause via std::error::Error::source.
Fields
Internal
A stikk-internal fault (a bug). The repository was not touched — only the seam writes, and only on an explicit confirmed mutation — so a fault here can never be a repository write (design ER-04). Session state is already flushed; the user may continue read-only.
Implementations§
Source§impl StikkError
impl StikkError
Sourcepub fn environment(
detail: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn environment( detail: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Construct an StikkError::Environment from a description and an underlying cause.
Sourcepub fn environment_msg(detail: impl Into<String>) -> Self
pub fn environment_msg(detail: impl Into<String>) -> Self
Construct an StikkError::Environment with no underlying cause.
Sourcepub const fn class(&self) -> &'static str
pub const fn class(&self) -> &'static str
The stable machine-readable class name, for the report format (design CL-07) and for tests.
Sourcepub const fn is_user_resolved(&self) -> bool
pub const fn is_user_resolved(&self) -> bool
True when this class must never be auto-retried (design NFR-S04): a refusal, a lock conflict, or a not-ready condition is the user’s to resolve, never stikk’s to retry silently.
Trait Implementations§
Source§impl Debug for StikkError
impl Debug for StikkError
Source§impl Display for StikkError
impl Display for StikkError
Source§impl Error for StikkError
impl Error for StikkError
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()