pub enum RemoteStoreError {
Show 13 variants
PreconditionFailed(ConcurrencyConflict),
PreconditionRequired {
detail: String,
},
IdempotencyConflict {
reason: String,
},
Unauthorized {
policy: String,
reason: String,
},
NotFound,
AlreadyExists {
detail: String,
},
InvalidRequest {
detail: String,
},
Conflict {
detail: String,
},
DependentNotFound {
detail: String,
},
HealthGateFailed {
revision_id: RevisionId,
failed_checks: Vec<HealthCheckId>,
message: String,
},
IntegrityMismatch {
expected: String,
actual: String,
},
NotYetImplemented {
detail: String,
},
Internal {
message: String,
},
}Expand description
Errors a remote store can return, each mapped to its HTTP status so the client and server agree on the contract.
Variants§
PreconditionFailed(ConcurrencyConflict)
If-Match/generation precondition failed — 412.
PreconditionRequired
A guarded write pinned no prior state — 428.
IdempotencyConflict
Idempotency key reused with a different request — 409.
RBAC denied the mutation — 403.
Fields
NotFound
Resource does not exist — 404.
AlreadyExists
Create-shaped request targeting a resource that already exists — 409.
Distinct from RemoteStoreError::IdempotencyConflict (same status):
that one is a key-reuse protocol violation, this one is a domain
conflict the caller resolves with an update verb instead.
InvalidRequest
Request body failed validation before any state was touched — 400.
Covers malformed payloads and key/payload mismatches (e.g. a body
whose env_id contradicts the URL).
Conflict
Domain/state conflict that is neither a create-on-existing
(RemoteStoreError::AlreadyExists) nor a key-reuse protocol
violation (RemoteStoreError::IdempotencyConflict) — 409.
E.g. a revision observed in a lifecycle the verb cannot start from,
or an archive blocked by live traffic references.
DependentNotFound
The environment exists but a sub-resource the verb references
(deployment, revision, slot, …) does not — 404. Distinct from
RemoteStoreError::NotFound (the environment itself is missing)
so clients can tell “wrong env” from “wrong dependent id”.
HealthGateFailed
The warm/ready health gate rejected the revision — 422. The server
has ALREADY persisted the revision’s lifecycle as Failed before
returning this (mirror of the local store’s committed-on-error
contract); clients must treat the mutation as committed.
IntegrityMismatch
Stored state failed its integrity hash — 422.
NotYetImplemented
The operation is recognized but not yet implemented — 501.
Internal
Store-internal failure — 500.
Implementations§
Source§impl RemoteStoreError
impl RemoteStoreError
Sourcepub fn http_status(&self) -> u16
pub fn http_status(&self) -> u16
HTTP status code this error maps to.
Trait Implementations§
Source§impl Clone for RemoteStoreError
impl Clone for RemoteStoreError
Source§fn clone(&self) -> RemoteStoreError
fn clone(&self) -> RemoteStoreError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RemoteStoreError
impl Debug for RemoteStoreError
Source§impl<'de> Deserialize<'de> for RemoteStoreError
impl<'de> Deserialize<'de> for RemoteStoreError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for RemoteStoreError
impl Display for RemoteStoreError
impl Eq for RemoteStoreError
Source§impl Error for RemoteStoreError
impl Error for RemoteStoreError
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()
Source§impl From<PreconditionError> for RemoteStoreError
impl From<PreconditionError> for RemoteStoreError
Source§fn from(err: PreconditionError) -> Self
fn from(err: PreconditionError) -> Self
Source§impl PartialEq for RemoteStoreError
impl PartialEq for RemoteStoreError
Source§fn eq(&self, other: &RemoteStoreError) -> bool
fn eq(&self, other: &RemoteStoreError) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RemoteStoreError
impl Serialize for RemoteStoreError
impl StructuralPartialEq for RemoteStoreError
Auto Trait Implementations§
impl Freeze for RemoteStoreError
impl RefUnwindSafe for RemoteStoreError
impl Send for RemoteStoreError
impl Sync for RemoteStoreError
impl Unpin for RemoteStoreError
impl UnsafeUnpin for RemoteStoreError
impl UnwindSafe for RemoteStoreError
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> 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::Request