pub enum Error {
Show 25 variants
Config(String),
Drive(Error),
DriveProofError(ProofError, Vec<u8>, BlockInfo),
Protocol(ProtocolError),
Proof(Error),
InvalidProvedResponse(String),
DapiClientError(DapiClientError),
DapiMocksError(MockError),
CoreError(Error),
MerkleBlockError(MerkleBlockError),
CoreClientError(Error),
MissingDependency(String, String),
TotalCreditsNotFound,
EpochNotFound,
TimeoutReached(Duration, String),
AlreadyExists(String),
InvalidCreditTransfer(String),
NonceOverflow(u64),
IdentityNonceNotFound(String),
Generic(String),
ContextProviderError(ContextProviderError),
Cancelled(String),
StaleNode(StaleNodeError),
StateTransitionBroadcastError(StateTransitionBroadcastError),
NoAvailableAddressesToRetry(Box<Error>),
}Expand description
Error type for the SDK
Variants§
Config(String)
SDK is not configured properly
Drive(Error)
Drive error
DriveProofError(ProofError, Vec<u8>, BlockInfo)
Drive proof error with associated proof bytes and block info
Protocol(ProtocolError)
DPP error
Proof(Error)
Proof verification error
InvalidProvedResponse(String)
Invalid Proved Response error
DapiClientError(DapiClientError)
DAPI client error, for example, connection error
DapiMocksError(MockError)
DAPI mocks error
CoreError(Error)
Dash core error
MerkleBlockError(MerkleBlockError)
MerkleBlockError
CoreClientError(Error)
Core client error, for example, connection error
MissingDependency(String, String)
Dependency not found, for example data contract for a document not found
TotalCreditsNotFound
Total credits in Platform are not found; we must always have credits in Platform
EpochNotFound
Epoch not found; we must have at least one epoch
TimeoutReached(Duration, String)
SDK operation timeout reached error
AlreadyExists(String)
Returned when an attempt is made to create an object that already exists in the system
InvalidCreditTransfer(String)
Invalid credit transfer configuration
NonceOverflow(u64)
Identity nonce overflow: the nonce has reached its maximum value and cannot be incremented further without wrapping to zero.
IdentityNonceNotFound(String)
Identity nonce not found on Platform.
Platform returned no nonce for the requested identity (or identity– contract pair). This usually means the queried DAPI node has not yet indexed the identity — for example right after identity creation or when the node is lagging behind the chain tip.
Recovery: retry the state transition; the SDK will re-fetch the nonce from a (potentially different) DAPI node on the next attempt.
Generic(String)
Generic error
ContextProviderError(ContextProviderError)
Context provider error
Cancelled(String)
Operation cancelled - cancel token was triggered, timeout, etc.
StaleNode(StaleNodeError)
Remote node is stale; try another server
StateTransitionBroadcastError(StateTransitionBroadcastError)
Error returned when trying to broadcast a state transition
NoAvailableAddressesToRetry(Box<Error>)
All available addresses have been exhausted (banned due to errors). Contains the last meaningful error that caused addresses to be banned.
Trait Implementations§
Source§impl CanRetry for Error
impl CanRetry for Error
Source§fn is_no_available_addresses(&self) -> bool
fn is_no_available_addresses(&self) -> bool
Source§fn is_node_failure(&self) -> bool
fn is_node_failure(&self) -> bool
Source§impl Error for Error
impl Error for Error
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
Source§impl From<AddressDoesNotExistError> for Error
impl From<AddressDoesNotExistError> for Error
Source§fn from(value: AddressDoesNotExistError) -> Self
fn from(value: AddressDoesNotExistError) -> Self
Source§impl From<AddressNotEnoughFundsError> for Error
impl From<AddressNotEnoughFundsError> for Error
Source§fn from(value: AddressNotEnoughFundsError) -> Self
fn from(value: AddressNotEnoughFundsError) -> Self
Source§impl From<AsyncError> for Error
impl From<AsyncError> for Error
Source§fn from(error: AsyncError) -> Self
fn from(error: AsyncError) -> Self
Source§impl From<ConsensusError> for Error
impl From<ConsensusError> for Error
Source§fn from(value: ConsensusError) -> Self
fn from(value: ConsensusError) -> Self
Source§impl From<ContextProviderError> for Error
impl From<ContextProviderError> for Error
Source§fn from(source: ContextProviderError) -> Self
fn from(source: ContextProviderError) -> Self
Source§impl From<DapiClientError> for Error
impl From<DapiClientError> for Error
Source§fn from(value: DapiClientError) -> Self
fn from(value: DapiClientError) -> Self
Source§impl<T> From<ExecutionError<T>> for Errorwhere
ExecutionError<T>: ToString,
impl<T> From<ExecutionError<T>> for Errorwhere
ExecutionError<T>: ToString,
Source§fn from(value: ExecutionError<T>) -> Self
fn from(value: ExecutionError<T>) -> Self
Source§impl From<OutputBelowMinimumError> for Error
impl From<OutputBelowMinimumError> for Error
Source§fn from(value: OutputBelowMinimumError) -> Self
fn from(value: OutputBelowMinimumError) -> Self
Source§impl From<PlatformVersionError> for Error
impl From<PlatformVersionError> for Error
Source§fn from(value: PlatformVersionError) -> Self
fn from(value: PlatformVersionError) -> Self
Source§impl From<ProtocolError> for Error
impl From<ProtocolError> for Error
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Source§impl From<StaleNodeError> for Error
impl From<StaleNodeError> for Error
Source§fn from(source: StaleNodeError) -> Self
fn from(source: StaleNodeError) -> Self
Source§impl From<StateTransitionBroadcastError> for Error
impl From<StateTransitionBroadcastError> for Error
Source§fn from(source: StateTransitionBroadcastError) -> Self
fn from(source: StateTransitionBroadcastError) -> Self
Source§impl From<TransitionNoInputsError> for Error
impl From<TransitionNoInputsError> for Error
Source§fn from(value: TransitionNoInputsError) -> Self
fn from(value: TransitionNoInputsError) -> Self
Source§impl From<TransitionNoOutputsError> for Error
impl From<TransitionNoOutputsError> for Error
Source§fn from(value: TransitionNoOutputsError) -> Self
fn from(value: TransitionNoOutputsError) -> Self
Source§impl From<ValidationResult<(), ConsensusError>> for Error
impl From<ValidationResult<(), ConsensusError>> for Error
Source§fn from(value: SimpleConsensusValidationResult) -> Self
fn from(value: SimpleConsensusValidationResult) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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<T> Conv for T
impl<T> Conv for T
§impl<T> CostsExt for T
impl<T> CostsExt for T
§fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
Self: Sized,
fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
Self: Sized,
CostContext object with provided costs.§fn wrap_fn_cost(
self,
f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
Self: Sized,
fn wrap_fn_cost(
self,
f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
Self: Sized,
CostContext object with costs computed using the
value getting wrapped.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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§impl<T, U> IntoOnNetwork<U> for Twhere
U: FromOnNetwork<T>,
impl<T, U> IntoOnNetwork<U> for Twhere
U: FromOnNetwork<T>,
§fn into_on_network(self, network: Network) -> U
fn into_on_network(self, network: Network) -> U
Calls U::from_on_network(self).
Source§impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
Source§fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.