pub enum StoreError {
Show 18 variants
NotFound(EnvId),
EnvIdMismatch {
file: EnvId,
value: EnvId,
},
UnsafeEnvId(EnvId),
Spec(SpecError),
Lock(LockError),
AtomicWrite(AtomicWriteError),
Io {
path: PathBuf,
source: Error,
},
Json {
path: PathBuf,
source: Error,
},
TrustRoot(TrustRootError),
OperatorKey(OperatorKeyError),
Conflict(String),
InvalidArgument(String),
DependentNotFound(String),
Lifecycle(Box<LifecycleError>),
RevenuePolicy(BundleDeploymentError),
Unauthorized {
policy: String,
reason: String,
},
NotYetImplemented(String),
CommittedAfterSave(Box<StoreError>),
}Variants§
NotFound(EnvId)
EnvIdMismatch
UnsafeEnvId(EnvId)
Spec(SpecError)
Lock(LockError)
AtomicWrite(AtomicWriteError)
Io
Json
TrustRoot(TrustRootError)
Surfaces from trust-root verbs on crate::environment::mutations —
the typed-verb shape returns StoreError so the HTTP backend can map
transport errors into the same enum. CLI callers preserve the
trust-root noun by downcasting this variant back to OpError::TrustRoot.
OperatorKey(OperatorKeyError)
Surfaces from bootstrap_trust_root / seed_trust_root_if_absent when
loading or generating ~/.greentic/operator/key.pem fails. Distinct
from TrustRoot so CLI callers can surface the right error noun.
Conflict(String)
Mutator-precondition violation surfaced by super::mutations verbs
(e.g. super::LocalFsStore::create_environment when the env already
exists). CLI callers preserve the conflict noun by downcasting in
[crate::cli::map_store_err_preserving_noun].
InvalidArgument(String)
Caller-supplied argument is structurally valid but semantically wrong
(e.g. a pack_id that does not appear in any current revision, or a
welcome-flow bundle that is not linked). CLI callers preserve the
invalid-argument noun via
[crate::cli::map_store_err_preserving_noun].
DependentNotFound(String)
Sub-entity (e.g. a BundleDeployment, EnvPackBinding,
MessagingEndpoint) is missing under an existing env. Distinct from
StoreError::NotFound which is reserved for missing envs. The CLI
mapper preserves the not-found noun by downcasting; the string
carries the verbatim caller-facing message (“deployment <id> not
found in env <env>”, etc.) so backend impls don’t have to reconstruct it.
Lifecycle(Box<LifecycleError>)
Revision-lifecycle failure surfaced by the typed
warm_revision / drain_revision / archive_revision verbs
(PR-3a.6). The inner super::LifecycleError preserves the
structured detail (HealthGateFailed::failed_checks,
Conflict::expected_starts, ActiveTrafficReference::splits)
the CLI renders to the operator. No #[from] impl: the cycle
between LifecycleError::Store(StoreError) and this variant is
broken in super::mutations_local by unwrapping
LifecycleError::Store back into the inner StoreError at the
boundary. CLI callers re-extract via
[crate::cli::map_store_err_preserving_noun].
RevenuePolicy(BundleDeploymentError)
Revenue-policy sidecar write failure (PR-3a.7b). Surfaces the
inner super::BundleDeploymentError so CLI callers can
downcast to OpError::RevenuePolicy via
[crate::cli::map_store_err_preserving_noun].
RBAC denial surfaced by a remote store backend (403 on the A8
wire, greentic_deploy_spec::RemoteStoreError::Unauthorized).
Local-FS verbs never construct it — local RBAC runs in the CLI’s
audit boundary before the verb fires. CLI callers preserve the
unauthorized noun via [crate::cli::map_store_err_preserving_noun]
(PR-4.0; previously flattened into StoreError::Conflict).
Fields
NotYetImplemented(String)
Verb recognized but not implemented by the backend (501 on the A8
wire, greentic_deploy_spec::RemoteStoreError::NotYetImplemented).
CLI callers preserve the not-yet-implemented noun via
[crate::cli::map_store_err_preserving_noun] (PR-4.0).
CommittedAfterSave(Box<StoreError>)
A typed-verb body persisted state to disk via the lifecycle
helper’s internal locked.save(...) and then failed on a
post-save step (env reload, materialized-runtime-config refresh,
etc.). The wrapped StoreError is the original failure; CLI
callers MUST treat the verb as committed (so the audit
boundary fails-closed on an audit-append failure rather than
demoting it to tracing::warn!) AND forward the inner error.
The closure-based revision-transition path already had this
invariant — surfacing it across the typed-verb boundary keeps
the committed-on-error contract intact (warm test
warm_ok_with_refresh_failure_and_audit_failure_returns_audit_error).
HTTP backends (PR-3b) wrap any “we wrote, then the response
pipeline failed” error in this variant for the same reason.
Implementations§
Source§impl StoreError
impl StoreError
Sourcepub fn is_committed_after_save(&self) -> bool
pub fn is_committed_after_save(&self) -> bool
true iff self is the StoreError::CommittedAfterSave wrapper.
Typed-verb callers (cli::revisions::typed_transition) query this
BEFORE mapping the error to an OpError so they can call
[crate::cli::CommitMarker::mark_committed] on the boundary — the
wrapper itself is unwrapped one layer at a time by
[crate::cli::map_store_err_preserving_noun].
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()
Source§impl From<AtomicWriteError> for StoreError
impl From<AtomicWriteError> for StoreError
Source§fn from(source: AtomicWriteError) -> Self
fn from(source: AtomicWriteError) -> Self
Source§impl From<BundleDeploymentError> for StoreError
impl From<BundleDeploymentError> for StoreError
Source§fn from(source: BundleDeploymentError) -> Self
fn from(source: BundleDeploymentError) -> Self
Source§impl From<LockError> for StoreError
impl From<LockError> for StoreError
Source§impl From<OperatorKeyError> for StoreError
impl From<OperatorKeyError> for StoreError
Source§fn from(source: OperatorKeyError) -> Self
fn from(source: OperatorKeyError) -> Self
Source§impl From<SpecError> for StoreError
impl From<SpecError> for StoreError
Source§impl From<StoreError> for OpError
impl From<StoreError> for OpError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Source§impl From<StoreError> for RunBootstrapError
impl From<StoreError> for RunBootstrapError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Source§impl From<StoreError> for RunRotateError
impl From<StoreError> for RunRotateError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Source§impl From<StoreError> for ValidateError
impl From<StoreError> for ValidateError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Source§impl From<StoreError> for AuditError
impl From<StoreError> for AuditError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Source§impl From<StoreError> for LifecycleError
impl From<StoreError> for LifecycleError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Source§impl From<TrustRootError> for StoreError
impl From<TrustRootError> for StoreError
Source§fn from(source: TrustRootError) -> Self
fn from(source: TrustRootError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for StoreError
impl !UnwindSafe for StoreError
impl Freeze for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Source§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.