pub enum ApiError {
EventCreationError {
source: EventError,
},
NotFound(String),
UnexpectedError,
ApprovalInternalError {
source: ApprovalErrorResponse,
},
InvalidParameters(String),
SignError,
VoteNotNeeded(String),
NotEnoughPermissions(String),
DatabaseError(String),
Conflict(String),
}
Expand description
Errors that may occur when using the TAPLE API
Variants§
EventCreationError
Fields
§
source: EventError
NotFound(String)
An item of the protocol has not been found, for example, a subject
UnexpectedError
An unexpected error has occurred
ApprovalInternalError
An error has occurred in the process of creating an event. An internal error has occurred
Fields
§
source: ApprovalErrorResponse
InvalidParameters(String)
Invalid parameters have been entered, usually identifiers.
SignError
An error occurred during a signature process
VoteNotNeeded(String)
No permissions required or possessed to vote on an event request.
NotEnoughPermissions(String)
DatabaseError(String)
Conflict(String)
Trait Implementations§
Source§impl Error for ApiError
impl Error for ApiError
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()
Auto Trait Implementations§
impl Freeze for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnwindSafe for ApiError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more