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§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: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
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()