Enum conjure_runtime::ServiceError[][src]

#[non_exhaustive]pub enum ServiceError {
    WrapInNewError,
    PropagateToCaller,
}

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)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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

impl Clone for ServiceError[src]

impl Copy for ServiceError[src]

impl Debug for ServiceError[src]

impl Eq for ServiceError[src]

impl PartialEq<ServiceError> for ServiceError[src]

impl StructuralEq for ServiceError[src]

impl StructuralPartialEq for ServiceError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,