Enum ic_agent::agent::agent_error::AgentError
source · [−]pub enum AgentError {
Show 38 variants
InvalidReplicaUrl(String),
TimeoutWaitingForResponse(),
WaiterRestartError(),
SigningError(String),
InvalidCborData(Error),
CannotCalculateRequestId(RequestIdError),
CandidError(Box<dyn Send + Sync + Error>),
UrlParseError(ParseError),
InvalidMethodError(InvalidMethod),
PrincipalError(PrincipalError),
ReplicaError {
reject_code: u64,
reject_message: String,
},
HttpError(HttpErrorPayload),
CannotUseAuthenticationOnNonSecureUrl(),
AuthenticationError(String),
InvalidReplicaStatus,
RequestStatusDoneNoReply(String),
MessageError(String),
CustomError(Box<dyn Send + Sync + Error>),
Leb128ReadError(Error),
Utf8ReadError(Utf8Error),
LookupPathAbsent(Vec<Label>),
LookupPathUnknown(Vec<Label>),
LookupPathError(Vec<Label>),
InvalidRequestStatus(Vec<Label>, String),
CertificateVerificationFailed(),
CertificateNotAuthorized(),
DerKeyLengthMismatch {
expected: usize,
actual: usize,
},
DerPrefixMismatch {
expected: Vec<u8>,
actual: Vec<u8>,
},
NoRootKeyInStatus(Status),
CouldNotReadRootKey(),
BlsInitializationFailure(),
WalletCallFailed(String),
WalletError(String),
WalletUpgradeRequired(String),
MissingReplicaTransport(),
ResponseSizeExceededLimit(),
TransportError(Box<dyn Error + Send + Sync>),
CallDataMismatch {
field: String,
value_arg: String,
value_cbor: String,
},
}
Expand description
An error that occurred when using the agent.
Variants
InvalidReplicaUrl(String)
The replica URL was invalid.
TimeoutWaitingForResponse()
The request timed out.
WaiterRestartError()
The waiter was restarted without being started first.
SigningError(String)
An error occurred when signing with the identity.
InvalidCborData(Error)
The data fetched was invalid CBOR.
CannotCalculateRequestId(RequestIdError)
There was an error calculating a request ID.
CandidError(Box<dyn Send + Sync + Error>)
There was an error when de/serializing with Candid.
UrlParseError(ParseError)
There was an error parsing a URL.
InvalidMethodError(InvalidMethod)
The HTTP method was invalid.
PrincipalError(PrincipalError)
The principal string was not a valid principal.
ReplicaError
Fields
reject_code: u64
The reject code returned by the replica.
reject_message: String
The rejection message.
The replica rejected the message.
HttpError(HttpErrorPayload)
The replica returned an HTTP error.
CannotUseAuthenticationOnNonSecureUrl()
Attempted to use HTTP authentication in a non-secure URL (either HTTPS or localhost).
AuthenticationError(String)
The password manager returned an error.
InvalidReplicaStatus
The status endpoint returned an invalid status.
RequestStatusDoneNoReply(String)
The call was marked done, but no reply was provided.
MessageError(String)
A string error occurred in an external tool.
CustomError(Box<dyn Send + Sync + Error>)
An error occurred in an external tool.
Leb128ReadError(Error)
There was an error reading a LEB128 value.
Utf8ReadError(Utf8Error)
A string was invalid UTF-8.
LookupPathAbsent(Vec<Label>)
The lookup path was absent in the certificate.
LookupPathUnknown(Vec<Label>)
The lookup path was unknown in the certificate.
LookupPathError(Vec<Label>)
The lookup path did not make sense for the certificate.
InvalidRequestStatus(Vec<Label>, String)
The request status at the requested path was invalid.
CertificateVerificationFailed()
The certificate verification failed.
CertificateNotAuthorized()
The certificate contained a delegation that does not include the effective_canister_id in the canister_ranges field.
DerKeyLengthMismatch
There was a length mismatch between the expected and actual length of the BLS DER-encoded public key.
DerPrefixMismatch
There was a mismatch between the expected and actual prefix of the BLS DER-encoded public key.
NoRootKeyInStatus(Status)
The status response did not contain a root key.
CouldNotReadRootKey()
Could not read the replica root key.
BlsInitializationFailure()
Failed to initialize the BLS library.
WalletCallFailed(String)
The invocation to the wallet call forward method failed with an error.
WalletError(String)
The wallet operation failed.
WalletUpgradeRequired(String)
The wallet canister must be upgraded. See dfx wallet upgrade
MissingReplicaTransport()
The transport was not specified in the AgentBuilder
.
ResponseSizeExceededLimit()
The response size exceeded the provided limit.
TransportError(Box<dyn Error + Send + Sync>)
An unknown error occurred during communication with the replica.
CallDataMismatch
Fields
field: String
The field that was mismatched.
value_arg: String
The value that was expected to be in the CBOR.
value_cbor: String
The value that was actually in the CBOR.
There was a mismatch between the expected and actual CBOR data during inspection.
Trait Implementations
sourceimpl Debug for AgentError
impl Debug for AgentError
sourceimpl Display for AgentError
impl Display for AgentError
sourceimpl Error for AgentError
impl Error for AgentError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Error> for AgentError
impl From<Error> for AgentError
sourceimpl From<Error> for AgentError
impl From<Error> for AgentError
sourceimpl From<InvalidMethod> for AgentError
impl From<InvalidMethod> for AgentError
sourcefn from(source: InvalidMethod) -> Self
fn from(source: InvalidMethod) -> Self
Converts to this type from the input type.
sourceimpl From<ParseError> for AgentError
impl From<ParseError> for AgentError
sourcefn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
sourceimpl From<PrincipalError> for AgentError
impl From<PrincipalError> for AgentError
sourcefn from(source: PrincipalError) -> Self
fn from(source: PrincipalError) -> Self
Converts to this type from the input type.
sourceimpl From<RequestIdError> for AgentError
impl From<RequestIdError> for AgentError
sourcefn from(source: RequestIdError) -> Self
fn from(source: RequestIdError) -> Self
Converts to this type from the input type.
sourceimpl From<Utf8Error> for AgentError
impl From<Utf8Error> for AgentError
Auto Trait Implementations
impl !RefUnwindSafe for AgentError
impl Send for AgentError
impl Sync for AgentError
impl Unpin for AgentError
impl !UnwindSafe for AgentError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more