pub enum ApprovalHandlerError {
BadRequest(String),
NotFound(String),
Conflict(String),
ReplayDetected(String),
Rejected(String),
Internal(String),
}Expand description
Errors returned by the approval handlers. Each variant maps onto a stable HTTP status so substrate adapters can relay the code without re-interpreting the semantics.
Variants§
BadRequest(String)
Request body could not be parsed into the expected JSON shape.
NotFound(String)
Target approval id does not exist in the store.
Conflict(String)
Approval was already resolved (single-response rule).
ReplayDetected(String)
Replay detected: the signed token has already been consumed.
Rejected(String)
Approval token failed binding / signature / time checks.
Internal(String)
Backend store surfaced an internal error.
Implementations§
Trait Implementations§
Source§impl Clone for ApprovalHandlerError
impl Clone for ApprovalHandlerError
Source§fn clone(&self) -> ApprovalHandlerError
fn clone(&self) -> ApprovalHandlerError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApprovalHandlerError
impl Debug for ApprovalHandlerError
Source§impl Display for ApprovalHandlerError
impl Display for ApprovalHandlerError
Source§impl Error for ApprovalHandlerError
impl Error for ApprovalHandlerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ApprovalStoreError> for ApprovalHandlerError
impl From<ApprovalStoreError> for ApprovalHandlerError
Source§fn from(e: ApprovalStoreError) -> Self
fn from(e: ApprovalStoreError) -> Self
Converts to this type from the input type.
Source§impl From<KernelError> for ApprovalHandlerError
impl From<KernelError> for ApprovalHandlerError
Source§fn from(e: KernelError) -> Self
fn from(e: KernelError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ApprovalHandlerError
impl RefUnwindSafe for ApprovalHandlerError
impl Send for ApprovalHandlerError
impl Sync for ApprovalHandlerError
impl Unpin for ApprovalHandlerError
impl UnsafeUnpin for ApprovalHandlerError
impl UnwindSafe for ApprovalHandlerError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.