pub enum TypedErrorPayload {
LastServiceRefused,
ServiceNotPresent,
ServiceAlreadyEnabled,
MediatorHandshakeFailed {
reason: String,
},
DrainTtlOutOfBounds {
min: u64,
max: u64,
requested: u64,
},
NoPriorMutation,
UnsupportedTransport {
detail: String,
},
}Expand description
Wire-format companion to the typed VtaError variants emitted
by the runtime service-management surface.
The free-form comment string carried by DIDComm problem-reports
(and the body string of REST error responses) is fine for the
variants whose only data is a human-readable message
(VtaError::Conflict, VtaError::NotFound, …) but lossy for
variants like VtaError::DrainTtlOutOfBounds that carry three
numeric fields the CLI needs to switch on.
Servers serialize a TypedErrorPayload into the response body
(REST) or problem-report args (DIDComm); clients deserialize
it back via VtaError::from_typed_payload. The discriminator
is the kebab-cased variant name in the code field.
Variants line up 1:1 with the §4 spec list — the existing
VtaError::UnsupportedTransport is included so the same
channel carries every typed-error wire form.
Variants§
LastServiceRefused
ServiceNotPresent
ServiceAlreadyEnabled
MediatorHandshakeFailed
DrainTtlOutOfBounds
NoPriorMutation
UnsupportedTransport
Trait Implementations§
Source§impl Clone for TypedErrorPayload
impl Clone for TypedErrorPayload
Source§fn clone(&self) -> TypedErrorPayload
fn clone(&self) -> TypedErrorPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more