pub enum RemoteError {
ActivationNotFound {
activation: String,
},
MethodNotFound {
activation: String,
method: String,
},
InvalidParams {
param: Option<String>,
problem: ParamProblem,
},
Unauthenticated,
Forbidden {
reason: DenyReason,
},
HandleNotSupported {
activation: String,
},
Execution {
message: String,
},
TooManyCalls {
max: u64,
child: Option<String>,
},
ChildUnavailable {
child: String,
reason: String,
},
ChildTimeout {
child: String,
timeout_ms: u64,
},
Other(OtherError),
}Expand description
Why a call failed — what an error frame carries, and the data of a
JSON-RPC-level rejection.
Its JSON Schema is written by hand (see the JsonSchema impl): the known
kinds as one kind-tagged union, KnownRemoteError, and any other kind
as OtherError — the two as an untagged union of references, a form
synapse’s IR reader takes (RETURNS-40), the wire unchanged.
Variants§
ActivationNotFound
The service has no activation by this name.
MethodNotFound
The activation exists but has no method by this name.
InvalidParams
The call’s params did not fit the method.
Fields
problem: ParamProblemWhat is wrong with it. Flattened: its problem tag sits beside
param on the wire.
Unauthenticated
The method requires credentials and the call carried none that verified.
Forbidden
The caller is authenticated but not allowed this call.
Fields
reason: DenyReasonWhich check the caller failed. Flattened: its reason tag sits
beside kind on the wire.
HandleNotSupported
The activation does not resolve handles.
Execution
The method ran and failed for a reason that is not the activation
saying no (that is an err item): a panic, a lost dependency.
TooManyCalls
spec/05, 09: the connection — or the child the call was routed to — holds its maximum of open calls; close one and call again.
Fields
spec/12 rule 5: the child the call was routed to is not there.
ChildTimeout
The child the call was routed to did not open it in the service’s time.
Other(OtherError)
A kind this build does not know, kept whole: its kind and every
other field (RETURNS-36), written back as it came. Read only for a
kind no known variant has (see the Deserialize impl).
Implementations§
Trait Implementations§
Source§impl Clone for RemoteError
impl Clone for RemoteError
Source§fn clone(&self) -> RemoteError
fn clone(&self) -> RemoteError
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 RemoteError
impl Debug for RemoteError
Source§impl<'de> Deserialize<'de> for RemoteError
impl<'de> Deserialize<'de> for RemoteError
Source§fn deserialize<D>(d: D) -> Result<RemoteError, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<RemoteError, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Display for RemoteError
impl Display for RemoteError
impl Eq for RemoteError
Source§impl Error for RemoteError
impl Error for RemoteError
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<&PlexusError> for RemoteError
RETURNS-6: the server’s failure, as the wire carries it.
impl From<&PlexusError> for RemoteError
RETURNS-6: the server’s failure, as the wire carries it.
PlexusError | RemoteError |
|---|---|
ActivationNotFound(name) | ActivationNotFound { activation: name } |
MethodNotFound { activation, method } | same |
InvalidParams { param, problem } | same |
ExecutionError(msg) | Execution { message: msg } |
HandleNotSupported(ns) | HandleNotSupported { activation: ns } |
TransportError(kind) — a service forwarding upstream failed | Execution { message: kind.to_string() } |
Unauthenticated(_) | Unauthenticated — the server-side reason stays server-side |
Forbidden { reason } | Forbidden { reason: DenyReason } |
Forbidden renders at most the single fact the caller already failed
(AUTHZ-CORE-1/5): MissingScope names the one unmet scope — the fact
the 0.6 wire already carried in its Display line — and
TenantBoundary / NotAccepted carry nothing.
Source§fn from(e: &PlexusError) -> Self
fn from(e: &PlexusError) -> Self
Source§impl From<Known> for RemoteError
impl From<Known> for RemoteError
Source§fn from(k: Known) -> RemoteError
fn from(k: Known) -> RemoteError
Source§impl Hash for RemoteError
impl Hash for RemoteError
Source§impl JsonSchema for RemoteError
Available on crate feature schema only.The known kinds (KnownRemoteError) or any other (OtherError), as an
untagged union of the two references — what synapse’s IR reader takes
for an open union (RETURNS-40); a tagged union cannot hold a member whose
kind is no const. The wire is RemoteError’s serde, unchanged.
impl JsonSchema for RemoteError
schema only.The known kinds (KnownRemoteError) or any other (OtherError), as an
untagged union of the two references — what synapse’s IR reader takes
for an open union (RETURNS-40); a tagged union cannot hold a member whose
kind is no const. The wire is RemoteError’s serde, unchanged.
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for RemoteError
impl PartialEq for RemoteError
Source§impl Serialize for RemoteError
impl Serialize for RemoteError
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for RemoteError
Auto Trait Implementations§
impl Forget for RemoteError
impl Freeze for RemoteError
impl Move for RemoteError
impl RefUnwindSafe for RemoteError
impl Send for RemoteError
impl Sync for RemoteError
impl Unpin for RemoteError
impl UnsafeUnpin for RemoteError
impl UnwindSafe for RemoteError
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.