Enum conjure_runtime::ServiceError
source · #[non_exhaustive]pub enum ServiceError {
WrapInNewError,
PropagateToCaller,
}
Expand description
Specifies the behavior of the client in response to a service error from a server.
Service errors are encoded as responses with a 4xx or 5xx response code and a body containing a SerializableError
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WrapInNewError
The service error will be propagated as a new internal service error.
The error’s cause will contain the information about the received service error, but the error constructed by the client will have a different error instance ID, type, etc.
This is the default behavior.
PropagateToCaller
The service error will be transparently propagated without change.
This is designed for use when proxying a request to another node, commonly of the same service. By preserving the original error’s instance ID, type, etc, the upstream service will be able to process the error properly.
Trait Implementations§
source§impl Clone for ServiceError
impl Clone for ServiceError
source§fn clone(&self) -> ServiceError
fn clone(&self) -> ServiceError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ServiceError
impl Debug for ServiceError
source§impl Hash for ServiceError
impl Hash for ServiceError
source§impl PartialEq for ServiceError
impl PartialEq for ServiceError
source§fn eq(&self, other: &ServiceError) -> bool
fn eq(&self, other: &ServiceError) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for ServiceError
impl Eq for ServiceError
impl StructuralPartialEq for ServiceError
Auto Trait Implementations§
impl Freeze for ServiceError
impl RefUnwindSafe for ServiceError
impl Send for ServiceError
impl Sync for ServiceError
impl Unpin for ServiceError
impl UnwindSafe for ServiceError
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
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.